# Validating Hugging Face API Token

**URL:** <https://discuss.huggingface.co/t/validating-hugging-face-api-token/45392>\
**Category:** Beginners\
**Created:** [July 2, 2023, 7:59pm UTC](https://discuss.huggingface.co/t/validating-hugging-face-api-token/45392 "2023-07-02T19:59:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenny91](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@kenny91](https://discuss.huggingface.co/u/kenny91)\
**Post date:** [July 2, 2023, 7:59pm UTC](https://discuss.huggingface.co/t/validating-hugging-face-api-token/45392/1 "2023-07-02T19:59:58Z")

</div>

Is there a specific endpoint or method available to verify if a given API token is valid or not ?

I’m working on a project where user has to provide hugging face API token.  
Before calling the model, I want to check if provided API is valid or not ?

---

<div class="post-metadata">

**Author:** ![ademait](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@ademait](https://discuss.huggingface.co/u/ademait)\
**Post date:** [July 19, 2023, 11:35am UTC](https://discuss.huggingface.co/t/validating-hugging-face-api-token/45392/2 "2023-07-19T11:35:30Z")

</div>

Hi @kenny91 , the endpoint is `api/whoami-v2`. I used this one some time ago.

You can also refer to this [Stackoverflow thread](https://stackoverflow.com/questions/72289714/how-to-validate-hugging-face-organization-token).
