Passer au contenu principal
POST
/
auth
/
token
Obtenir un JWT depuis une clé d'API
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>"
}

Autorisations

X-API-KEY
string
header
requis

Corps

application/json
external_user_id
string
requis

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

Exemple:

"user_123"

expires_in_minutes
integer
défaut:60

Token expiration time in minutes.

Plage requise: 5 <= x <= 1440

Réponse

Successful Response

access_token
string
requis
token_type
string
requis