How to properly make a curl API call with token authentication? or Struggling with a curl API call wi

16 Replies, 1440 Views

Yo, 401 sucks. Quick q: is the token base64 encoded? Some APIs expect that.

Try:
```
curl -H "Authorization: Bearer $(echo -n 'MY_TOKEN' | base64)" https://api.example.com/data
```

If that fails, maybe the API docs have a curl api call with token example. Check their GitHub or dev portal!

Messages In This Thread



Users browsing this thread: 1 Guest(s)