# Further Insights on Token Issue with /models Endpoint

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffurther-insights-on-token-issue-with-models-endpoint%2F129159%3E%5C
**Category:** Beginners\
**Created:** [December 4, 2024, 5:10am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffurther-insights-on-token-issue-with-models-endpoint%2F129159 "2024-12-04T05:10:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miguelcrespo](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@miguelcrespo](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmiguelcrespo)%5C
**Post date:** [December 4, 2024, 5:10am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffurther-insights-on-token-issue-with-models-endpoint%2F129159%2F1 "2024-12-04T05:10:17Z")

</div>

Thank you for the initial responses and support so far. To summarize the issue:

1. I receive a `401 Unauthorized` error when attempting to access the `/models` endpoint using `curl` and a valid token.
2. I have tried the following:

- Generating both fine-grained and read-only tokens with appropriate permissions.
- Using the `Connection: close` header to ensure the connection is terminated after the request.
- Testing the token immediately after creation to rule out expiration issues.
- Confirming that other endpoints like individual model queries also fail.

1. A fellow community member, John, confirmed the same issue on his setup using his own token.

It seems this issue might not be specific to my account or setup but rather a broader issue with token validation for the `/models` endpoint.

Could you clarify:

- Is there any restriction on accessing the `/models` endpoint with the current API tokens?
- Are there known issues with token validation at the moment?
- Should I be using a specific token type or account tier to access this functionality?

If this requires deeper investigation, could you direct me to the appropriate Hugging Face support channel or escalation path?

Thank you again for your time and assistance. I look forward to your guidance.

Best regards,  
Miguel

---

<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:** [December 4, 2024, 6:10am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffurther-insights-on-token-issue-with-models-endpoint%2F129159%2F2 "2024-12-04T06:10:49Z")

</div>

@not-lain At first glance, it looks like an environment-dependent network error, but it can’t be fixed using the usual methods.
