# Invalid credentials in Authorization header - HfApiModel

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-credentials-in-authorization-header-hfapimodel%2F147158%3E%5C
**Category:** Course\
**Created:** [March 24, 2025, 9:12am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-credentials-in-authorization-header-hfapimodel%2F147158 "2025-03-24T09:12:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [March 24, 2025, 10:46am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-credentials-in-authorization-header-hfapimodel%2F147158%2F2 "2025-03-24T10:46:54Z")

</div>

The following basic measures may help, but the Inference API is currently unstable and Qwen 2.5 Coder 32B is busy, so there is also the possibility of individual problems…  
I’ll bring it if I find something.

> [@Acces token dont work](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Facces-token-dont-work%2F134346)%3A
>
> i can login using cmd like i always get that my token is wrong but i create 3 tokens 3 were wrong i tried everything can someone help?

> [@401 Error: Invalid Credentials in Authorization Header (Flan-T5-Large Inference API)](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2F401-error-invalid-credentials-in-authorization-header-flan-t5-large-inference-api%2F143207)%3A
>
> I have already done the following: white_check_mark Created an API token on Hugging Face white_check_mark Checked that my token has “Make calls to inference providers” permission white_check_mark Tried regenerating a new token and replacing it in my script white_check_mark Confirmed that my Hugging Face account is active and not restricted This is the error message i get: I have already done the following: This is the error message i get: import requests HF\_TOKEN = “JOUW\_NIEUWE\_A…

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-credentials-in-authorization-header-hfapimodel%2F147158)._
