Once you have received an authorization code from the Authorization Request, you can exchange it for access and refresh tokens. Access tokens are short-lived (24 hour expiration) and are used as authentication against Gemini APIs, while refresh tokens never expire and are used to regenerate access tokens.
Unique ID of your application. This is provided in your API settings.
client_secretstring
Secret of your application, provided when you register a confidential client in API settings. Confidential clients only — public clients must not send this, and a request that includes it will fail.
codestring·required
The authorization code received from the Authorization Request.
redirect_uristring·required
Must match the redirect_uri provided in the Authorization Request.
grant_typestring·required
The literal string "authorization_code".Example: authorization_code
code_verifierstring
Required for public clients. The original
Code
code_verifier
you generated before the authorization request (43–128 characters from