# How to know ACCESS TOKEN is Working

**URL:** <https://discuss.huggingface.co/t/how-to-know-access-token-is-working/144201>\
**Category:** Beginners\
**Created:** [March 5, 2025, 9:34am UTC](https://discuss.huggingface.co/t/how-to-know-access-token-is-working/144201 "2025-03-05T09:34:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amityvivek](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/amityvivek/32/41070_2.png) [@amityvivek](https://discuss.huggingface.co/u/amityvivek)\
**Post date:** [March 5, 2025, 9:34am UTC](https://discuss.huggingface.co/t/how-to-know-access-token-is-working/144201/1 "2025-03-05T09:34:36Z")

</div>

Hi I have following query.  
In this program HUGGING\_FACE\_API\_KEY is not mentioned. The line of code is written as  
HUGGING\_FACE\_API\_KEY=os.environ.get(“HUGGING\_FACE\_API\_KEY”)  
Then my question is how the code is running? Has the API Key value is kept in some env file?

---

<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 5, 2025, 9:57am UTC](https://discuss.huggingface.co/t/how-to-know-access-token-is-working/144201/2 "2025-03-05T09:57:21Z")

</div>

There are probably many people using whoami.

> [@Can't login to Huggingface CLI](https://discuss.huggingface.co/t/cant-login-to-huggingface-cli/139741/10):
>
> Is there a way to check the rate limits? I’ve contacted HF via email but haven’t heard back confused

```auto
pip install -U huggingface_hub

```

```py
from huggingface_hub import login, whoami

login(token="hf_....")
whoami()

```
