# Token

The Configuration API uses the OAuth 2.0 Client Credentials grant.

Request API credentials from Retarus before calling the API. Keep the client secret and every access token confidential; do not commit them to source control or write them to application logs.

 - [Generate an access token](https://developers.retarus.com/seg/seg-config-openapi/token/generate-an-access-token.md): ## Generate an access token Send a `POST` request to `https://api-auth-service.eu.retarus.com/realms/platform/protocol/openid-connect/token` with the content type `application/x-www-form-urlencoded` a
 - [Example request](https://developers.retarus.com/seg/seg-config-openapi/token/example-request.md): ## Example request ```bash curl --request POST \ --url "https://api-auth-service.eu.retarus.com/realms/platform/protocol/openid-connect/token" \ --header "Content-Type: application/x-www-form-url
 - [Example response](https://developers.retarus.com/seg/seg-config-openapi/token/example-response.md): ## Example response ```json { "access_token": "<ACCESS_TOKEN>", "expires_in": 300, "token_type": "Bearer", "scope": "<GRANTED_SCOPES>" } ```
 - [Use the token](https://developers.retarus.com/seg/seg-config-openapi/token/use-the-token.md): ## Use the token ```bash curl --header "Authorization: Bearer <ACCESS_TOKEN>" \ "https://api.retarus.com/seg/config/v1/beta/<CUSTOMER_ID>/directory/domains" ```
