> For the complete documentation index, see [llms.txt](https://dupr.gitbook.io/dupr-raas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dupr.gitbook.io/dupr-raas/get-started/partner-access-token-generation.md).

# 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 %}
