How do you use the whoami endpoint?

Hey there! Thanks for raising!

The endpoint was updated to whoami-v2, it seems we missed updating that doc page. Here is a working example

curl https://huggingface.co/api/whoami-v2 -H "Authorization: Bearer your_token"

Note that we also have a Python library with a whoami method you can use if that’s useful. huggingface_hub/src/huggingface_hub at main · huggingface/huggingface_hub · GitHub

4 Likes