capabilities.work

Cloud IAM Authenticate and Inspect the Calling API Key

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

Recipe · 3 steps

Cloud IAM Authenticate and Inspect the Calling API Key

with IBM · Identity & Access Management

Mint an IAM access token from an API key, identify the key, and refresh the token.

  1. Exchange the API key for an IAM access token using the IBM API key grant type. The token is valid for one hour and carries the identity of whoever the API key belongs to.
  2. Look the API key up by its value to confirm which IAM ID and account the integration is authenticating as, and whether the key is locked or disabled.
  3. Renew the access token with the refresh token returned by the first step so a long-running integration never presents an expired credential.
What you'll need to have ready
  • apikey: The IBM Cloud API key value to authenticate with.
  • includeHistory: Whether to include the activity history of the API key in the lookup.
For your developer

Arazzo workflow ibm:authenticate-and-inspect-api-key, 3 operations: createAccessToken → getApiKeysDetails → createAccessToken. Specs on APIs.io.