# 1. Token

Firstly, the document signature application/portal calls the UAEPASS API to obtain the access token using client credentials issued to them.

<mark style="color:green;">`POST`</mark> **`stg-id.uaepass.ae/trustedx-authserver/oauth/main-as/token`**&#x20;

HTTP/1.1

#### Headers

<table data-full-width="false"><thead><tr><th width="750">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Authorization</td><td>string</td><td>Basic ZG9jc2lnbjpkZW1vZGVtbw==</td></tr><tr><td>Content-Type</td><td>string</td><td>application/x-www-form-urlencoded</td></tr><tr><td>grant_type </td><td>string</td><td>client_credentials</td></tr><tr><td>scope</td><td>string</td><td>urn:safelayer:eidas:sign:process:document</td></tr></tbody></table>

{% tabs %}
{% tab title="200 Content-Type: application/json;charset=utf-8
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache" %}

```
{
"access_token" : "{string}" 
"token_type" : "bearer", 
"expires_in" : 300

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uaepass.ae/feature-guides/signature-integration-guide/digital-signature-multiple-document/signing-guide/untitled/1.-obtaining-the-token-for-accessing-the-signature-operations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
