# Generate an access token

## 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` and these form fields:
| Field | Value |
|  --- | --- |
| `grant_type` | `client_credentials` |
| `client_id` | Client ID supplied by Retarus |
| `client_secret` | Client secret supplied by Retarus |

A successful response contains `access_token`, `expires_in`, `token_type`, and the granted `scope`. Use the `access_token` as an HTTP Bearer token for Configuration API requests:
`Authorization: Bearer <ACCESS_TOKEN>`
Access tokens are short-lived. Cache a token only until shortly before `expires_in` elapses, then request a new one with the same client credentials. A Client Credentials token is not renewed with an end-user refresh-token flow.

Version: 1.2.1
Security: Prod
