Skip to content
This is a new version of the Kivra Developer Docs. Report issues or share feedback at avsandare.support@kivra.se. The previous version can be found here.

Create access token

POST
/v1/auth
curl --request POST \
--url https://sender.api.kivra.com/v1/auth \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials

Authenticate with OAuth 2.0 client credentials to obtain an access token for Tenant API requests.

See the Tenant API authentication guide for details. Partner integrations use the same endpoint; see the Partner API authentication guide.

Media typeapplication/x-www-form-urlencoded
object
grant_type
required
string
Allowed values: client_credentials

Access token created

Media typeapplication/json
TokenResponse
object
access_token
required

OAuth 2.0 access token.

string
token_type
required

Token type to use in the Authorization header.

string
expires_in
required

Lifetime of the access token in seconds.

integer
Examplegenerated
{
"access_token": "example",
"token_type": "example",
"expires_in": 1
}

The request body is invalid.

The client credentials are invalid.