tidbyt.dev icon indicating copy to clipboard operation
tidbyt.dev copied to clipboard

API explorer sending invalid authorization header?

Open humanapp opened this issue 3 years ago • 1 comments

While trying out the API at https://tidbyt.dev/docs/api, my calls would fail with the status code 401 and below response, even though I'd authorized with a valid API key.

{
  "code": 16,
  "message": "auth error: rpc error: code = Unauthenticated desc = Bad authorization string",
  "details": []
}

Inspecting the call in the debugger, I noticed the authorization header does not include the Bearer prefix:

authorization: eyJhbGciOiJFUzI....

Could this be why they're failing?

humanapp avatar Nov 23 '22 00:11 humanapp

Yes, I just noticed the same thing myself.

I would expect in the page that it would prepend Bearer and a space for you, but that is not the case.

dmarcucci avatar Nov 26 '22 18:11 dmarcucci