Skip to main content
POST
/
v1
/
connections
Initiate OAuth connection
curl --request POST \
  --url https://api.cuadra.ai/v1/connections \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "connectorSlug": "<string>",
  "redirectUrl": "<string>",
  "scopes": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "authorizationUrl": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "status": "pending"
}

Authorizations

Authorization
string
header
required

JWT token from Stytch B2B authentication (magic link, SSO, or M2M)

Headers

Idempotency-Key
string | null

Body

application/json

Request to initiate OAuth connection.

connectorSlug
string
required

Connector type: google_drive

redirectUrl
string
required

URL to redirect after OAuth

scopes
string[] | null

Optional custom OAuth scopes

Response

Successful Response

Response when initiating OAuth flow.

id
string
required
authorizationUrl
string
required

Redirect user to this URL

expiresAt
string<date-time>
required

State token expiration

status
string
default:pending