Personal Access Tokens

Create a new personal access token

Changed on

Create a new personal access token. A maximum of 10 personal access tokens can be created.

post/v3/users/{userId}/access-tokens

Request

  • Base URL: https://global.api.konghq.com
  • URL: https://global.api.konghq.com/v3/users/{userId}/access-tokens
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Request body

OR

Example request

{
  "expires_at": "2022-11-04T20:10:06.927Z"
}

Response

Response containing details of the created personal access token.

idstring uuid required

Contains a unique identifier used for this resource.

user_idstring uuid required

Contains a unique identifier used for a user.

namestring required
state'ACTIVE' | 'REVOKED' | 'EXPIRED' required

State of the personal access token.

konnect_tokenstring required

The Konnect token used to authenticate with Konnect.

revoked_bystring uuid nullable

Contains a unique identifier used for the user that revoked this token.

created_atstring date-time required

An ISO-8601 timestamp representation of entity creation date.

updated_atstring date-time

An ISO-8601 timestamp representation of entity update date.

last_used_atstring date-time nullable

An ISO-8601 timestamp representation of entity last used date.

expires_atstring date-time nullable required

An ISO-8601 timestamp representation of entity expiration date.

revoked_atstring date-time nullable

An ISO-8601 timestamp representation of entity revoked at date.

Example response

{
  "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "user_id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "revoked_by": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z",
  "last_used_at": "2022-11-04T20:10:06.927Z",
  "expires_at": "2022-11-04T20:10:06.927Z",
  "revoked_at": "2022-11-04T20:10:06.927Z"
}

Changes

    • breaking

      added to the / response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the ////// response property for the response status

    • warning

      added the new unique enum value to the ////// response property for the response status

    • warning

      added the new 400.00 enum value to the response property for the response status

    • warning

      added the new 401.00 enum value to the response property for the response status

    • warning

      added the new 403.00 enum value to the response property for the response status

    • warning

      added the new 404.00 enum value to the response property for the response status

    • warning

      added the new 409.00 enum value to the response property for the response status