# Authorisation API

You can download the full swagger specification in JSON format below:

{% file src="<https://1201843429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JZZSvL3DmX19a9SgDAt%2Fuploads%2FLelzkxcekyY7xzf8chWL%2Fuqudo_authorization_openapi.json?alt=media&token=75a321cf-ec17-4705-bc1a-f49aeba20ce2>" %}

You can download the full swagger specification in YAML format below:

{% file src="<https://1201843429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JZZSvL3DmX19a9SgDAt%2Fuploads%2FFjDzm6ZkiP4WgVjFijFS%2Fuqudo_authorization_openapi.yaml?alt=media&token=3ebfe815-cefb-451a-9012-1a04a87463dd>" %}

Retrieve the authorization token using oauth2 client credentials grant type. You can obtain your client credentials by navigating to the "[Credentials](https://portal.uqudo.com/credentials)" tab located in the "Development" section of our [Uqudo Customer Portal](https://docs.uqudo.com/docs/kyc/readme/customer-portal)

**Note:** Don’t perform this operation inside your mobile application but only from your backend

<mark style="color:green;">`POST`</mark> `https://auth.uqudo.io/api/oauth/token`

Get the access token to use the uqudo SDK and the uqudo API.&#x20;

**Note**: The content type of the request is **application/x-www-form-urlencoded**

#### Request Body

| Name                                             | Type   | Description                                 |
| ------------------------------------------------ | ------ | ------------------------------------------- |
| grant\_type<mark style="color:red;">\*</mark>    | String | Use the fixed value **client\_credentials** |
| client\_id<mark style="color:red;">\*</mark>     | String | Provided client id                          |
| client\_secret<mark style="color:red;">\*</mark> | String | Provided client secret                      |

{% tabs %}
{% tab title="200: OK Content type: application/json" %}

```javascript
{
  "access_token": "JWS authorization token",
  "token_type": "bearer",
  "expires_in": 1800,
  "scope": "scopes",
  "jti": "30a622fd-11aa-464a-8eaf-6fa868540cb0"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid client id or client secret" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}
