oauth

Generate OAuth access token

Changed on

Generate a new OAuth access token using an authorization code; or refresh an existing one using a continuous refresh token.

Follow the complete steps for requesting and refreshing tokens.

Note: If your app was created before September 25, 2025, make sure to set the continuous_refresh parameter to true to use the continuous refresh token (60-day expiration, refreshable indefinitely). Pinterest no longer supports the legacy refresh token (365-day expiration, hard limit).

Disregard this note if your app was activated on or after September 25, 2025. You are automatically using the continuous refresh token.

Use Token Debugger to validate and inspect your access token.

post/oauth/token

Request

Request body application/x-www-form-urlencoded

codestring
continuous_refreshstring

If your app was created before September 25, 2025, set to true to generate a continuous refresh token, which has a 60-day expiration window. We no longer support the legacy refresh token, which has a 365-day expiration window.

If your app was created on or after September 25, 2025, ignore this parameter. You automatically receive a continuous refresh token when you request an access token.

grant_type'authorization_code' | 'refresh_token' | 'client_credentials' required

The type of OAuth grant being requested.

redirect_uristring
refresh_tokenstring
scopestring

Response

The request has succeeded.

access_tokenstring required
expires_ininteger required
refresh_tokenstring
refresh_token_expires_atinteger
refresh_token_expires_ininteger
response_type'authorization_code' | 'refresh_token' | 'client_credentials'

The type of OAuth grant being requested.

scopestring
token_typestring required

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response's property type changed from string to no type for status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      removed request discriminator

    • info

      removed response discriminator for the response status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      the response optional property became read-only for the status

    • info

      added to the response property allOf list for the response status

    • info

      removed the authorization_code enum value from the response property for the response status

    • info

      removed the client_credentials enum value from the response property for the response status

    • info

      removed the refresh_token enum value from the response property for the response status

    • info

      the response required property became read-only for the status

    • info

      the response required property became read-only for the status

    • info

      the response required property became read-only for the status

    • info

      added the success response with the status

    • info

      removed everlasting_refresh mapping keys from the response discriminator for the response status