Google OAuth

Claim Google OAuth token bundle

Consumes a one-time Google OAuth session ticket, requires the authenticated user to match the user that started it, persists the refresh token when present, and returns the token bundle to the desktop.

post/v1/google-oauth/claim

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /v1/google-oauth/claim
  • Auth: HTTP bearer

Request body

sessionstring required

Opaque state/session ticket returned to the desktop deep link.

Example request

{
  "session": "state_abc123"
}

Response

Claimed Google token bundle.

access_tokenstring required

Provider access token.

expires_atinteger required

Unix timestamp in seconds when the access token expires.

refresh_tokenstring nullable

Provider refresh token, present on claim when the provider issues one.

scopestring nullable

Space-delimited OAuth scopes.

token_typestring nullable

OAuth token type.

Example response

{
  "access_token": "example-access-token",
  "expires_at": 1790784000,
  "refresh_token": "1//refresh",
  "scope": "openid email profile https://www.googleapis.com/auth/gmail.readonly",
  "token_type": "Bearer"
}

Changes

No operation changes recorded.