"Struggling with a curl API call with token – any tips?"
Hey folks,
Trying to make a curl api call with token auth, but it keeps failing with a 401. I'm passing the token like this:
```
curl -H "Authorization: Bearer MY_TOKEN" https://api.example.com/data
```
But no luck. Am I missing something obvious?
Also, should the token be in quotes? Tried both ways, still nada.
Any help appreciated! Thx in advance.
---
*PS: If you’ve got a working example of a curl api call with token, pls share!*
Hey folks,
Trying to make a curl api call with token auth, but it keeps failing with a 401. I'm passing the token like this:
```
curl -H "Authorization: Bearer MY_TOKEN" https://api.example.com/data
```
But no luck. Am I missing something obvious?
Also, should the token be in quotes? Tried both ways, still nada.
Any help appreciated! Thx in advance.
---
*PS: If you’ve got a working example of a curl api call with token, pls share!*
