Create API token
POST
https://api.datawrapper.de/v3/auth/tokens This endpoint will create a new API Token and show it in the response body.
It is possible to create a comment with every token to have a reference where it is used.
Make sure to save the token somewhere, since you won't be able to see it again. Requires scope auth:write.
Example Request
curl --request POST \
--url https://api.datawrapper.de/v3/auth/tokens \
--header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
--header 'Content-Type: application/json' \
--data '{
"comment": "Token for fun project"
}'Headers
| Name | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Yes | The format of the request body. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
comment | string | Yes | The comment can be everything. Tip: Use something to remember where this specific token is used. |
scopes | string[] | No |
Response
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | No | |
comment | string | No | |
scopes | string[] | No | |
token | string | No | |
createdAt | string | No | |
url | string | No |