Affected: REST API
Overview
This topic explains how to manage stale access tokens when you reach your access token limit. If your account has too many existing tokens, you may need to remove older tokens before you can create new ones.
Instead of deleting access tokens in the LaunchDarkly UI, you can use the LaunchDarkly REST API to remove tokens that are no longer in use.
Solution
Use the LaunchDarkly REST API to identify recently unused access tokens and delete them.
To do this:
List all access tokens using the List access tokens endpoint. To learn more, read List access tokens.
Review the
lastUsedfield for each token.Identify tokens that have not been used within your defined time period, such as the last 90 days.
Delete each stale token (one at a time) using the delete access token endpoint. To learn more, read Delete access token.
It’s recommended to rely on the response headers X-Ratelimit-Global-Remaining, X-Ratelimit-Route-Remaining, and X-RateLimit-Reset to handle rate limiting dynamically. To learn more, read API docs
If you still require additional access tokens after removing unused ones, please contact LaunchDarkly Support to request an access token limit increase.