capabilities.work

OAuth Token Lifecycle

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

Recipe · 3 steps

OAuth Token Lifecycle

with HubSpot
Works with AI assistants

Exchange a code for tokens, refresh, then inspect the access token metadata.

  1. Exchange the authorization code for an access token and refresh token using the authorization_code grant.
  2. Use the refresh token from the initial exchange to obtain a fresh access token via the refresh_token grant.
  3. Retrieve metadata for the refreshed access token to confirm its granted scopes and time-to-expiry.
What you'll need to have ready
  • clientId: The OAuth application client ID.
  • clientSecret: The OAuth application client secret.
  • code: The authorization code returned to the redirect URI.
  • redirectUri: The redirect URI registered with the application.
For your developer

Arazzo workflow hubspot:oauth-token-lifecycle, 3 operations: createOrRefreshAccessToken → createOrRefreshAccessToken → getAccessTokenMetadata. Specs on APIs.io.