Skip to main content
POST
/
vault
/
oauth
/
require-auth
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/vault/oauth/require-auth \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "appSlug": "<string>",
  "agentId": "<string>",
  "userId": "<string>"
}
'
{
  "authenticated": true,
  "connectedAccount": {
    "id": "<string>",
    "agentId": "<string>",
    "userId": "<string>",
    "appDefinitionId": "<string>",
    "appSlug": "<string>",
    "appName": "<string>",
    "appIconUrl": "<string>",
    "customAppId": "<string>",
    "grantedScopes": [
      "<string>"
    ],
    "accountLabel": "<string>",
    "accountEmail": "<string>",
    "statusMessage": "<string>",
    "tokenExpiresAt": "2023-11-07T05:31:56Z",
    "lastRefreshedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "connectLinkUrl": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Input for checking if a service is authenticated and getting a Connect Link if not

appSlug
string
required

App slug to check authentication for

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

Response

200 - application/json

OK

Authentication status and Connect Link for a service

authenticated
boolean
required

Whether the service is currently authenticated

connectedAccount
object | null
required

Connected account details (if authenticated)

Connect Link URL to authenticate (if not authenticated)