Docs / SynthEvents / Errors / token-missing

token-missing

The request to generate events carries no token.

  • Status: 401 Unauthorized
  • Route: POST /api/v1/generate-events
  • Description: token is missing: expected a bearer token in the Authorization header
  • Details: Empty. The response has the header WWW-Authenticate: Bearer.

Why It Happens#

Generating a data set takes a token, in the header Authorization, after the scheme Bearer. The request has no Authorization header, one with another scheme, such as Basic, or one with the scheme Bearer but no token after it. SynthEvents checks the token before the body, so it says nothing about the body until the token is there.

How to Fix It#

Send your token in the header Authorization, after Bearer and a space:

curl \
  -X POST \
  -H "authorization: Bearer <TOKEN>" \
  -H "content-type: application/json" \
  -d '{ ... }' \
  -OJ \
  https://api.synthevents.io/api/v1/generate-events

If you have no token, ask for a tailor-made data set, and we send you one. For the ready-made data sets, you need none: fetch them with read-data-set.