---
title: "Get token from AAD."
method: POST
path: "/auth/client_credentials"
---

# Get token from AAD.

`POST /auth/client_credentials`

## Request

- Base URL: `http://fss.ukho.gov.uk`
- URL: `http://fss.ukho.gov.uk/auth/client_credentials`
- Auth: HTTP bearer

Returns a token direct from AAD using Client Credentials.

## Request body

- object
  - `client_id` string: The application ID that's assigned to the distributor's app. This will be provided to the distributor when they register their application.
  - `client_secret` string: The client secret that was generated for the distributor's app when the app was registered. The client secret must be URL-encoded before being sent.

## Response `200`

OK

- object
  - `token_type` string
  - `expires_in` string
  - `ext_expires_in` string
  - `access_token` string

## Other responses

- `400`: Bad request - Request missing client_id and/or client_secret.
- `401`: Unauthorised - either you have not provided any credentials, or your credentials are not recognised.
- `403`: Forbidden - you have been authorised, but you are not allowed to access this resource.
- `429`: You have sent too many requests in a given amount of time. Please back-off for the time in the Retry-After header (in seconds) and try again.

---

[API](https://skmtc.dev/uk-hydrographic-office/apis/ukho-file-share-service-apis.md) - [All operations](https://skmtc.dev/uk-hydrographic-office/apis/ukho-file-share-service-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/uk-hydrographic-office/apis/ukho-file-share-service-apis/revisions/31121f0e92c4?raw)
