POST
/
iam
/
clients
/
{clientId}
/
tokens
curl --request POST \
  --url https://api.gcore.com/iam/clients/{clientId}/tokens \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My token",
  "description": "It'\''s my token",
  "exp_date": "2021-01-01 12:00:00+00:00",
  "client_user": {
    "role": {
      "id": 1,
      "name": "Administrators"
    }
  }
}'
{
  "token": "<string>"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

clientId
integer
required

Account ID.

Body

application/json

Response

200
application/json

OK.

The response is of type object.