# Invalid user token when attempting to login

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-user-token-when-attempting-to-login%2F145299%3E%5C
**Category:** 🤗Hub\
**Created:** [March 12, 2025, 12:30am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-user-token-when-attempting-to-login%2F145299 "2025-03-12T00:30:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![onekq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/onekq/32/33367_2.png) [@onekq](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fonekq)%5C
**Post date:** [March 12, 2025, 12:30am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-user-token-when-attempting-to-login%2F145299%2F1 "2025-03-12T00:30:15Z")

</div>

I tried huggingface\_hub.login and got Invalid user token exception. But I went to the tokens setting to find it normal. This is a write token. It was last refreshed in October.

What went wrong here?

---

<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 12, 2025, 9:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-user-token-when-attempting-to-login%2F145299%2F2 "2025-03-12T09:26:03Z")

</div>

You can create as many tokens as you like, so why not try making some new ones?

> **[Hugging Face – The AI community building the future.](https://huggingface.co/login?next=%2Fsettings%2Ftokens)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

Also, today is a day when the token specifications change a lot, so they may work or they may not.😅  
[website@huggingface.co](mailto:website@huggingface.co)

---

<div class="post-metadata">

**Author:** ![onekq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/onekq/32/33367_2.png) [@onekq](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fonekq)%5C
**Post date:** [March 13, 2025, 5:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-user-token-when-attempting-to-login%2F145299%2F3 "2025-03-13T17:28:34Z")

</div>

Thanks John. Refreshing works. But there has been no warning of any sort so it’s quite confusing. You can imagine how many workflows were disrupted

---

<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 13, 2025, 5:49pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finvalid-user-token-when-attempting-to-login%2F145299%2F4 "2025-03-13T17:49:27Z")

</div>

I really wish there were fewer problems with account and token authentication… I run into them from time to time too.

Tokens are a good system because they’re safer than passwords if they get leaked, but I often wish there were more specific announcements and FAQs about their operation.

Something like “If you have a problem like this, do this!” or “There will be construction work on token authentication this week, so please be careful as there may be problems!” would be good…😓
