Not Authorized Error with API

Solved3 replies
tliddle30
10 posts

I've been working with the API for sometime now and it has worked perfectly, however, recently (in the past two months or so) the API is giving me a 'Not Authorized' error whenever I try to access the API.  I've tried via the command line and through the Swagger-UI.  My command is simple (see below).  Just trying to get a list of antlets.

My suggestion

curl -X GET --header 'Accept: application/octet-stream' --header 'Authorization: eyJhb.......' 'http://myantsle.local:3000/api/antlets'

Not authorized

Former member

Tagging @mpbaum, our API ant king

▲ 1
Marc BaumStaffAnswerPicked by the antsle Team
51 posts

Hey @tliddle30!

You need to use the word `Token ` in your Authentication header along with the actual JWT. So your request should look something like this:

```

curl -X GET --header 'Accept: application/octet-stream' --header 'Authorization: Token eyJhb.......' 'http://myantsle.local:3000/api/antlets'

```

Let me know how that goes. Best, Marc

▲ 1

Log in to reply. New here? It takes a minute.