[b]"How to properly make a curl API call with token authentication?"[/b] or [b]"Struggling with a curl API call wi

16 Replies, 1181 Views

"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!*

Messages In This Thread
[b]"How to properly make a curl API call with token authentication?"[/b] or [b]"Struggling with a curl API call wi - by - 03-09-2024, 09:52 AM



Users browsing this thread: 1 Guest(s)