# 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"}}}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references-1/readme/api-reference-22/service-access-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
