Problem with Hugging Face OAuth API
Hello,I am working on a school project where I need to perform authentications with third-party services, and in my case, I am using the Hugging Face service. The OAuth2.0 process is completed successfully, but when I try to make a request to the endpoint:https://huggingface.co/api/whoami-v2with the access_token obtained from the post request tohttps://huggingface.co/oauth/tokenI get an error:{“error”: “Invalid username or password.”}I have double-checked everything, the token, the parameters, etc., but nothing works; I still get this response. However, when I make exactly the same request with a personal access token generated in the settings of my account, it works correctly. How can I solve this problem?
2024-06-12T03:50:29Z
same problem
2024-06-12T03:59:20Z
Please check your HF_TOKEN environment variables or your .bashrc file. It seems that huggingface-cli whoami perfer to use HF_TOKEN. I solved by changing HF_TOKEN to the newest token.