Skip to main content
POST
/
v1
/
token
Exchange authorization code for grant token
curl --request POST \
  --url https://grantex-auth-dd4mtrt2gq-uc.a.run.app/v1/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "agentId": "<string>",
  "codeVerifier": "<string>"
}
'
{
  "grantToken": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "scopes": [
    "<string>"
  ],
  "refreshToken": "<string>",
  "grantId": "<string>"
}

Authorizations

Authorization
string
header
required

Developer API key

Body

application/json
code
string
required

Authorization code from consent approval

agentId
string
required
codeVerifier
string

PKCE code verifier (required if code_challenge was used)

Response

Grant token issued

grantToken
string

Signed RS256 JWT

expiresAt
string<date-time>
scopes
string[]
refreshToken
string
grantId
string