# Partner Access Token Generation

## Generating your Access Token

Once you have your Client Key and Client Secret, you can generate the required access token for all other partner API endpoints.

#### Authentication Endpoint

<table><thead><tr><th width="179">Environment</th><th>API</th></tr></thead><tbody><tr><td>UAT</td><td><a href="https://uat.mydupr.com/api/swagger-ui/index.html#/Authentication/login">UAT: Generate Access Token</a></td></tr><tr><td>Production</td><td><a href="https://prod.mydupr.com/api/swagger-ui/index.html#/Authentication/login">Prod: Generate Access Token</a></td></tr></tbody></table>

#### Authorization Steps

1. **Format Credentials:** Encode your Client Key and Secret in the following format:\
   `base64( ClientKey:ClientSecret )`
2. **Request Token:** Send a `POST` request to the appropriate endpoint above.
3. **Set Header:** Include the base64 encoded string from Step 1 in the `x-authorization` header.
4. **Receive Bearer Token:** The response will include a bearer token, which must be used to authorize all other Partner API calls.

{% hint style="info" %}
**Access tokens are valid for 1 hour.** Because they are stateless, they can be safely cached, shared across your services, and refreshed as needed.
{% endhint %}


---

# 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://dupr.gitbook.io/dupr-raas/get-started/partner-access-token-generation.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.
