Tokens API
Create and manage API Access Tokens.
How grants work
{
"grants": [
{ "connection_name": "carto_dw", "source": "carto-demo-data.demo_tables.airports" }
],
"allowed_apis": ["sql", "maps"]
}Endpoints
Creates an API Access Token.
Each grant ties a connection to a source — a fully qualified table name, a
SQL query, or * for everything reachable through that connection. Keep
grants as narrow as your application allows.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
Restrict use of the token to these HTTP referers. Empty means any.
A name for the token. Generated if omitted.
When the token stops working. Must be in the future. Omit for a token that never expires. Can only be set at creation.
The token was created.
The token to send in the Authorization header.
The request is malformed or a parameter failed validation.
The token is missing, malformed or expired.
The token doesn't grant access to this resource.
You went over the rate limit for this API.
Lists the API Access Tokens you can see.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
The tokens.
The token to send in the Authorization header.
The token is missing, malformed or expired.
You went over the rate limit for this API.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
The token string.
The token.
The token to send in the Authorization header.
The token is missing, malformed or expired.
The token doesn't grant access to this resource.
The resource doesn't exist.
Replaces the grants, referers, allowed APIs and name of a token. The expiration date can't be changed — create a new token instead.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
The token string.
Restrict use of the token to these HTTP referers. Empty means any.
A name for the token. Generated if omitted.
When the token stops working. Must be in the future. Omit for a token that never expires. Can only be set at creation.
The updated token.
The token to send in the Authorization header.
The request is malformed or a parameter failed validation.
The token is missing, malformed or expired.
The token doesn't grant access to this resource.
The resource doesn't exist.
Deletes a token and returns the deleted object.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
The token string.
The deleted token.
The token to send in the Authorization header.
The token is missing, malformed or expired.
You can't delete this token — either it isn't yours, or a map is still using it.
The resource doesn't exist.
Last updated
Was this helpful?
