Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step by step setup with "403 Client Error" #270

Closed
orlevit opened this issue Apr 15, 2024 · 3 comments
Closed

Step by step setup with "403 Client Error" #270

orlevit opened this issue Apr 15, 2024 · 3 comments

Comments

@orlevit
Copy link

orlevit commented Apr 15, 2024

Hi 👋
I am folllowing the usage instructions and I get the following error:
"HTTPError: [Errno 403] 403 Client Error: Forbidden for url: https://genius.com/api/search/multi?q=Andy+Shauf"

The code + error:
image

The token is the "generated access token" from the Genius API:
image

Even with oauth2, I still get the same error
image

What am i missing?
Thanks for the help! 😊

@allerter
Copy link
Collaborator

Hi. You're not missing anything. Also, you don't need to set up OAuth2 unless you need it for authorizing people on your web app (which doesn't seem to be the case for you).
The problem here is that geniust.search_artist sends requests to Genius's Web API; this API is the front-facing API that doesn't need a token to be used and subsequently is checked by Genius's IP checker. The solution here is to either: change your IP or use methods that don't send requests to the Web API (you will have limited functionality in this case).

@orlevit
Copy link
Author

orlevit commented Apr 16, 2024

Thanks!
It worked 😊

@Louanes1
Copy link

Louanes1 commented May 3, 2024

It worked when I tried to run from a local python file. Same code wasn't working on google collab (not the same ip address) I was getting the 403 error code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants