Skip to main content
POST
/
v1
/
authorize
Create an authorization request
curl --request POST \
  --url https://grantex-auth-dd4mtrt2gq-uc.a.run.app/v1/authorize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agentId": "<string>",
  "principalId": "<string>",
  "scopes": [
    "<string>"
  ],
  "redirectUri": "<string>",
  "state": "<string>",
  "expiresIn": "24h",
  "audience": "<string>",
  "codeChallenge": "<string>",
  "codeChallengeMethod": "S256"
}
'
{
  "authRequestId": "<string>",
  "consentUrl": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "sandbox": true,
  "code": "<string>",
  "policyEnforced": true,
  "effect": "allow"
}

Authorizations

Authorization
string
header
required

Developer API key

Body

application/json
agentId
string
required
principalId
string
required

Your application's user identifier

scopes
string[]
required
redirectUri
string<uri>
state
string
expiresIn
string
default:24h

Duration string (e.g. '1h', '24h', '7d')

audience
string
codeChallenge
string

PKCE code challenge (S256 only)

codeChallengeMethod
enum<string>
Available options:
S256

Response

Authorization request created

authRequestId
string
expiresAt
string<date-time>
sandbox
boolean
code
string

Present in sandbox mode or when policy auto-approves

policyEnforced
boolean
effect
enum<string>
Available options:
allow