Skip to main content
POST
/
auth
/
token
Get JWT from API Key
import requests

url = "https://app.ubik-agent.com/api/v1/auth/token"

payload = {
    "external_user_id": "user_123",
    "expires_in_minutes": 60
}
headers = {
    "X-API-KEY": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "access_token": "<string>",
  "token_type": "<string>"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
external_user_id
string
required

The unique identifier of the end-user to scope this token to.

Example:

"user_123"

expires_in_minutes
integer
default:60

Token expiration time in minutes.

Required range: 5 <= x <= 1440

Response

Successful Response

access_token
string
required
token_type
string
required