# HF Inference Endpoints Error 429

**URL:** <https://discuss.huggingface.co/t/hf-inference-endpoints-error-429/147436>\
**Category:** Inference Endpoints on the Hub\
**Created:** [March 26, 2025, 4:17am UTC](https://discuss.huggingface.co/t/hf-inference-endpoints-error-429/147436 "2025-03-26T04:17:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ofmit](https://avatars.discourse-cdn.com/v4/letter/o/958977/32.png) [@ofmit](https://discuss.huggingface.co/u/ofmit)\
**Post date:** [March 26, 2025, 4:17am UTC](https://discuss.huggingface.co/t/hf-inference-endpoints-error-429/147436/1 "2025-03-26T04:17:59Z")

</div>

HF Inference Endpoints  
I’m trying to use Hugging Face Inference Endpoints with the following code:

```auto
from huggingface_hub import get_inference_endpoint

endpoint_name = 'my-endpoint-name'
endpoint = get_inference_endpoint(endpoint_name, token=self.hf_token)
endpoint.resume()
endpoint.wait()
client = endpoint.client

client.base_url = endpoint.url

res = client.post(json={"inputs": url})

```

But I get this error:  
**“Invalid user token”**

I’ve double-checked that `self.hf_token` is copied correctly from my Hugging Face account, and it has all necessary permissions (API access and Inference endpoint usage).

Additionally, when I try running:  
`huggingface-cli login`  
I also get an error (it doesn’t let me log in).

Has anyone encountered this before?  
Is there something else I need to set up, or any known issues with inference tokens?

Thank you for any help!

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/3/9/39cbaf1face63aa1c69f125e87d94fdcf980b358.png)

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 26, 2025, 11:09am UTC](https://discuss.huggingface.co/t/hf-inference-endpoints-error-429/147436/2 "2025-03-26T11:09:07Z")

</div>

Judging from the error message, it is possible that the token is really invalid. Or perhaps the necessary permissions have not been granted to the token…?

Mine is just a READ token.

```py
from huggingface_hub import get_inference_endpoint
url = "https://huggingface.co/"
endpoint_name = 'Qwen/QwQ-32B'
HF_TOKEN = "hf_my_pro_token"
try:
    endpoint = get_inference_endpoint(endpoint_name, token=HF_TOKEN)
except Exception as e:
    print(e)
# 404 Client Error: Not Found for url: https://api.endpoints.huggingface.cloud/v2/endpoint/John6666/Qwen/QwQ-32B (Request ID:

HF_TOKEN = "foobar"
endpoint = get_inference_endpoint(endpoint_name, token=HF_TOKEN)
# raise HTTPError(error_message, request=e.request, response=e.response) from e
# requests.exceptions.HTTPError: Invalid user token.

```

---

<div class="post-metadata">

**Author:** ![ofmit](https://avatars.discourse-cdn.com/v4/letter/o/958977/32.png) [@ofmit](https://discuss.huggingface.co/u/ofmit)\
**Post date:** [March 27, 2025, 3:15am UTC](https://discuss.huggingface.co/t/hf-inference-endpoints-error-429/147436/3 "2025-03-27T03:15:09Z")

</div>

> [@ofmit](#):
>
> Inference Endpoints

I have checked all the required tokens and permissions for usage.

My program retrieves data from the queue and sends it for processing at the inference endpoints using API requests.

However, after running for a while, I occasionally receive an error message: **“Invalid user token.”**
