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

NameValueRequiredDescription
Content-Typeapplication/jsonYesThe format of the request body.

Request Body

FieldTypeRequiredDescription
commentstringYesThe comment can be everything. Tip: Use something to remember where this specific token is used.
scopesstring[]No

Response

FieldTypeRequiredDescription
idintegerNo
commentstringNo
scopesstring[]No
tokenstringNo
createdAtstringNo
urlstringNo