> For the complete documentation index, see [llms.txt](https://docs.uaepass.ae/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uaepass.ae/web-registration/endpoints/2.-access-token.md).

# 2. Access Token

SP should obtain the access token by passing the same access code which was received in the [previous step](/feature-guides/authentication/web-application/1.-obtaining-the-oauth2-access-code.md).&#x20;

### cURL Request for Token Generation Call

```
curl --location --request POST 'https://stg-id.uaepass.ae/idshub/token?grant_type=authorization_code&redirect_uri=https://stg-selfcare.uaepass.ae&code=bfe96299-83f4-3ee9-80e4-56c24f5265d3' \
--header 'Content-Type: multipart/form-data' \
--header 'Authorization: Basic c2FuZGJveF9zdGFnZTpzYW5kYm94X3N0YWdl'
```

{% hint style="info" %}
Replace code parameter '**{Access Code}**' with the value received from [**Access Code.**](/feature-guides/authentication/web-application/1.-obtaining-the-oauth2-access-code.md)&#x20;
{% endhint %}

### Response

```
{
    "access_token": "ae8b5533-be41-340f-a812-00178r262a3a",
    "refresh_token": "b3709437-1w67-356a-a8e4-cee5f252ref1",
    "token_type": "Bearer",
    "expires_in": 3600
}
```
