> **Description:** Comprehensive collection of frequently asked questions and troubleshooting guidance for access token generation, management, common issues, and best practices in both standard and partner authentication flows.

# Access token FAQ

## What do I do if I've compromised the keys?

If you accidentally share your [sales unit API keys](https://developer.vippsmobilepay.com/docs/knowledge-base/api-keys.md), you must generate new ones by clicking the *regenerate* button
on your [business portal sales unit](https://portal.vippsmobilepay.com) page.
See [How to regenerate API keys](https://developer.vippsmobilepay.com/docs/knowledge-base/portal.md#how-to-regenerate-api-keys) for step-by-step instructions.

For keys other than a merchant's [sales unit API keys](https://developer.vippsmobilepay.com/docs/knowledge-base/api-keys.md), [contact the partner team](https://developer.vippsmobilepay.com/docs/contact.md#are-you-a-partner-needing-support).
For a merchant's sales unit keys, the merchant needs to generate new ones on the business portal.
See [How to regenerate API keys](https://developer.vippsmobilepay.com/docs/knowledge-base/portal.md#how-to-regenerate-api-keys) for step-by-step instructions.

Update your integrations so they will continue working.

## Why are there two endpoints?

The new [token endpoint][mtx] follows a fully standard OAuth client credentials flow, which means you can use any of the [trusted OAuth libraries](https://oauth.net/code/) to handle token management. We are working towards making this endpoint available for more APIs and use cases over time.

In the meantime, the original [accesstoken endpoint][atx] continues to work as before, so existing integrations are not affected.

### How long is an access token valid?

With [`POST:/accesstoken/get`][atx], the access token is valid for 1 hour in the test environment
and 24 hours in the production environment.

With [`POST:/miami/v1/token`][mtx], the access token is valid for 15 minutes regardless of the environment.

[atx]: https://developer.vippsmobilepay.com/redocusaurus/access-token-swagger-id.yaml
[mtx]: https://developer.vippsmobilepay.com/redocusaurus/access-token-swagger-id.yaml

> **Full site overview:** For every page in this documentation, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).
