Service Access Token

Requesting a service access token

post

Sends an authentication request and returns a service access token.

Note: We do not support refresh tokens for service access tokens. In case your service access token expires, you need to send a new authentication request.

Grant type parameter is always client_credentials.

Header parameters
Content-TypestringRequired
Body
grant_typestringOptional
client_idstringOptional
client_secretstringOptional
scopestringOptional
Responses
200
The request was successful. A service access token is returned.
application/json
post
POST /oauth/token HTTP/1.1
Host: api.emporix.io
Content-Type: application/json
Accept: */*
Content-Length: 125

{
  "client_id": "{client_id}",
  "client_secret": "{client_secret}",
  "grant_type": "client_credentials",
  "scope": "tenant={tenant} ..."
}
200

The request was successful. A service access token is returned.

{
  "refresh_token_expires_in": 0,
  "refresh_token": "",
  "session_idle_time": 120,
  "token_type": "Bearer",
  "access_token": "vkFuQ6oTwj8_Ye4eiRSsqMeqLYNeQRJi",
  "expires_in": 14399,
  "scope": "tenant={tenant} ..."
}

Was this helpful?