Exchange authorization code for tokens

Exchanges an authorization code for tokens. Use the resulting access token to call the Userinfo endpoint.

For an authorization-code exchange, provide grant_type=authorization_code, the code returned to the redirect URI, the same redirect_uri used in the authorization request, and the original PKCE code_verifier.

Form Data

Token request parameters

string
required

Your registered client identifier.

string
required

Authorization code returned to the registered redirect_uri. It is single-use; exchange it promptly.

enum
required

OAuth grant type. Set to authorization_code.

Allowed:
string
required

Original PKCE verifier corresponding to the code_challenge sent in the authorization request. Include it when using PKCE.

string
required

The same redirect URI used in the authorization request.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json