Create an access token
const url = 'https://api.gampeon.com/v1/me/tokens';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","scopes":["profile:read"],"expiresInDays":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.gampeon.com/v1/me/tokens \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "scopes": [ "profile:read" ], "expiresInDays": 1 }'Creates a personal access token for an AI assistant, an MCP client or a tool. The answer contains the token once; only a hash is stored. A notification token_created is added to the account. Only with a portal session. Access tokens cannot manage tokens (403 token_not_allowed).
Not available with access tokens.
Rate limit: 10 per hour per account.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Name to recognise the token, for example “Claude Desktop”
At least one scope
Validity in days, default 30
Responses
Section titled “Responses”Token created
object
The token, gpat_ and 43 characters. Shown only in this answer.
Unix time in milliseconds
Example
{ "scopes": [ "profile:read" ]}Error codes: invalid_field
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: unauthorized
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_limit_reached
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Limit: 10 per hour per account. Error codes: rate_limited
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}