Skip to main content
POST
/
vault
/
oauth
/
link
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/vault/oauth/link \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "appSlug": "<string>",
  "agentId": "<string>",
  "userId": "<string>",
  "scopes": [
    "<string>"
  ],
  "callbackUrl": "<string>",
  "customAppId": "<string>"
}
'
{
  "linkUrl": "<string>",
  "token": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Body

application/json

Input for creating a Connect Link — a hosted auth URL

appSlug
string
required

App slug to create a link for (e.g. google, github)

agentId

Agent identifier. Optional when using an agent API key (resolved automatically); required when using a master key.

Pattern: ^[0-9a-z]+$
userId
string

End-user ID for multi-tenant scoping

scopes
string[]

Override default scopes

callbackUrl
string<uri>

URL to redirect to after auth completes

customAppId
string

Use a custom OAuth app (BYOA)

Response

200 - application/json

OK

Created Connect Link for zero-code authentication

Full Connect Link URL for the user to open

token
string
required

Link token for status polling

expiresAt
string<date-time>
required

When the link expires (10 minutes)