# Service Access Token

## Requesting a service access token

> 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\`\`\`.<br>

````json
{"openapi":"3.0.1","info":{"title":"OAuth Service","version":"0.0.1"},"servers":[{"url":"https://api.emporix.io","description":"Production"}],"paths":{"/oauth/token":{"post":{"tags":["Service Access Token"],"summary":"Requesting a service access token","description":"Sends an authentication request and returns a service access token.\n\n**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.\n\nGrant type parameter is always ```client_credentials```.\n","operationId":"POST-oauth-request-client-credentials","parameters":[{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AccessTokenRequest"}}}},"responses":{"200":{"description":"The request was successful. A service access token is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessToken"}}}}}}}},"components":{"schemas":{"AccessTokenRequest":{"type":"object","properties":{"grant_type":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"scope":{"type":"string"}}},"AccessToken":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer","format":"int32"},"session_idle_time":{"type":"integer","format":"int32"},"refresh_token":{"type":"string"},"refresh_token_expires_in":{"type":"integer","format":"int32"},"scope":{"type":"string"}}}}}}
````
