Google auth
Exchange OAuth Code for Tokens
POST
Exchange OAuth Code for Tokens
Exchange a Google OAuth authorization code for tokens. If Google credentials are configured, the user's Google Groups will be fetched and added to the ID token's payload before re-signing.
This endpoint is public (no auth required) as it's called during the OAuth flow.
POST /otto/api/google-auth/token Request body
application/json- body
client_id*stringGoogle OAuth client ID
client_secret*stringGoogle OAuth client secret
code*stringOAuth authorization code
grant_type?stringDefault
"authorization_code"redirect_uri*stringOAuth redirect URI
Format
uri[key: string]?unknownPOST /otto/api/google-auth/token Positive response
application/json- response
access_token*stringexpires_in*numberid_token*stringJWT with groups claim added
refresh_token?stringscope*stringtoken_type*stringcurl -X POST 'https://your.server.net/otto/api/google-auth/token' \ -H 'Content-Type: application/json' \ -d '{ "client_id": "string", "client_secret": "string", "code": "string", "redirect_uri": "http://example.com", "property1": null, "property2": null}'Example Response
{ "access_token": "string", "expires_in": 0, "id_token": "string", "refresh_token": "string", "scope": "string", "token_type": "string"}Was this page helpful?