# I can't get the token I created to work

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fi-cant-get-the-token-i-created-to-work%2F168205%3E%5C
**Category:** Beginners\
**Created:** [September 8, 2025, 6:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fi-cant-get-the-token-i-created-to-work%2F168205 "2025-09-08T18:28:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dobidoingg](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@dobidoingg](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdobidoingg)%5C
**Post date:** [September 8, 2025, 6:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fi-cant-get-the-token-i-created-to-work%2F168205%2F1 "2025-09-08T18:28:39Z")

</div>

I keep getting this error:

{“token\_test”:“completed”,“status”:“401 Unauthorized”,“token\_sent”:“I’m not including the token value but it is a valid token”,“response”:“{“error”:“Invalid credentials in Authorization header”}”,“inference\_test”:{“status”:“404 Not Found”,“response”:“Not Found”}}

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [September 8, 2025, 10:43pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fi-cant-get-the-token-i-created-to-work%2F168205%2F2 "2025-09-08T22:43:03Z")

</div>

For example, [it might appear if you misconfigured fine-grained tokens](https://stackoverflow.com/questions/78640818/bad-request-authorization-header-is-correct-but-the-token-seems-invalid), but [the causes of a 401 error are diverse](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-401-client-error-unauthorized-for-url%2F19714)%E2%80%A6

Anyway, [testing the token with `whoami-v2`](https://huggingface.co/docs/hub/api#get-apiwhoami-v2) makes it easier to isolate the problem.
