Initiates the OAuth 2.0 authorization code grant flow. Redirect the user to Gemini to authenticate and authorize requested scopes. After authorization, Gemini redirects the user to your redirect URI with an authorization code to exchange for access and refresh tokens.
curl --request GET \
--url 'https://exchange.gemini.com/auth?client_id=my_id&response_type=code&redirect_uri=www.example.com%2Fredirect&state=82350325&scope=balances%3Aread%2Corders%3Acreate'
URL Parameters
client_idstring·required
Unique ID of your application from your API settings.
response_typestring·required
The literal string "code".Example: code
redirect_uristring·required
The callback URL where Gemini redirects users after authorization. Must match an approved redirect URI configured in your API settings.
statestring·required
An opaque string used to protect against CSRF attacks. Gemini returns this value unchanged in the callback redirect. Verify that the returned state matches the original request before exchanging the code.
scopestring·required
A comma-separated list of OAuth scopes corresponding to the access you are requesting. These scopes must be included in your list of scopes in your app registration.
code_challengestring
Required for public clients. The PKCE code challenge: