capabilities.work

Rotate User API Key

A 3-step recipe with PropelAuth. We can help you get access.

Recipe · 3 steps

Rotate User API Key

with PropelAuth · Identity & Access Management

Revoke a user's existing API key and issue a fresh one in its place.

  1. List the user's active API keys and take the most recent.
  2. Revoke the user's current API key so the old token stops validating.
  3. Issue a fresh API key bound to the same user.
What you'll need to have ready
  • backendApiKey: PropelAuth Backend Integration API key presented as a bearer token.
  • userId: Identifier of the user whose API key should be rotated.
  • expiresAtSeconds: Optional Unix-seconds expiry for the replacement API key.
For your developer

Arazzo workflow propelauth:rotate-user-api-key, 3 operations: fetchActiveApiKeys → deleteApiKey → createApiKey. Specs on APIs.io.