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

403 forbidden #36

Closed
Stift007 opened this issue Mar 24, 2022 · 2 comments
Closed

403 forbidden #36

Stift007 opened this issue Mar 24, 2022 · 2 comments
Labels
tag: invalid This doesn't seem right tag: stale Old issues with minimal activity. type: question Further information is requested

Comments

@Stift007
Copy link

import valorant

KEY = "my personal api key"
client = valorant.Client(KEY)

agents = client.get_characters()

print(agents.get("Viper"))

Returns

Traceback (most recent call last):
  File "c:/Users/clyde/Documents/disco/main.py", line 11, in <module>
    client = valorant.Client(KEY)
  File "C:\Users\clyde\AppData\Local\Programs\Python\Python38\lib\site-packages\valorant\client.py", line 71, in __init__
    self.get_content(cache=True)
  File "C:\Users\clyde\AppData\Local\Programs\Python\Python38\lib\site-packages\valorant\client.py", line 181, in get_content
    content = self._content_if_cache()
  File "C:\Users\clyde\AppData\Local\Programs\Python\Python38\lib\site-packages\valorant\client.py", line 81, in _content_if_cache
    return ContentDTO(self.handle.call("GET", "content"))
  File "C:\Users\clyde\AppData\Local\Programs\Python\Python38\lib\site-packages\valorant\caller.py", line 52, in call
    r.raise_for_status()
  File "C:\Users\clyde\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://na.api.riotgames.com/val/content/v1/contents?locale=de-DE
@frissyn
Copy link
Owner

frissyn commented Mar 24, 2022

A 403 Forbidden error usually means that your API key is invalid or expired. Try generating a new one from the portal and see if that works.

@frissyn frissyn added tag: invalid This doesn't seem right type: question Further information is requested tag: stale Old issues with minimal activity. and removed tag: invalid This doesn't seem right labels Mar 25, 2022
@frissyn
Copy link
Owner

frissyn commented Apr 11, 2022

Closing due to inactivity!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: invalid This doesn't seem right tag: stale Old issues with minimal activity. type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants