Tokens

Operations related to user's personal access tokens, and service accounts API tokens. Information about rate limits can be found from Rate Limits documentation.

Get personal access tokens

GET
https://api.prompteasy.eu/v1/tokens

Response

List of tokens

Response fields application/json
Show child attributes
idinteger
Example
1
tokenstring
Example
1|...
created_atstring<date-time>
last_used_atstring<date-time> | null
403Forbidden

Forbidden

Authorization

ApiKeyAuthapiKey in header
BearerAuthhttp (bearer)

Issue a access token for a bot user

POST
https://api.prompteasy.eu/v1/tokens/bot/{user}

Parameters

userintegerrequiredpath

Response

200OKToken

Token response

Response fields application/json
tokenstring
Example
1|...
400Bad Request

Target user is not a bot

403Forbidden

Forbidden

Authorization

ApiKeyAuthapiKey in header
BearerAuthhttp (bearer)

Issue a personal access token

POST
https://api.prompteasy.eu/v1/tokens/personal

Response

200OKToken

Token response

Response fields application/json
tokenstring
Example
1|...

Authorization

ApiKeyAuthapiKey in header
BearerAuthhttp (bearer)

Revoke a access token

DELETE
https://api.prompteasy.eu/v1/tokens/{tokenId}

Parameters

tokenIdstringrequiredpath

Response

200OKobject

Token revoked successfully

Response fields application/json
messagestring
Example
Token revoked.
404Not Found

Token not found or unauthorized

Authorization

ApiKeyAuthapiKey in header
BearerAuthhttp (bearer)