POST
/
users
/
create_dynamic_token_v2
curl --request POST \
  --url https://api.gan.ai/users/create_dynamic_token_v2 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "expiry_time": {
    "days": 123,
    "hours": 123,
    "minutes": 123
  },
  "token_name": "<string>"
}'
{
  "access_token": "<string>"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
expiry_time
object
required

The desired expiration time for the access token must follow such a format.

token_name
string
required

The name that you want to assign to the token must be sent with the request. A user can't have two valid tokens with the same name.

Response

200 - application/json
access_token
string
required

This access token has the requested expiration time and must be saved by the user.