osome-iu / botometer-python

A Python API for Botometer by OSoMe
https://botometer.osome.iu.edu
MIT License
371 stars 59 forks source link

HTTPError: 403 Client Error: #51

Closed nanciwan closed 4 years ago

nanciwan commented 4 years ago

. Do you know the reason? requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://botometer-pro.p.rapidapi.com/2/check_account. Do you know the reason?

benabus commented 4 years ago

@nanciwan 403 errors tend to be caused by incorrect or missing API keys.

wzy6642 commented 4 years ago

I have the same problem, and I have input rapidapi_key.

clayadavis commented 4 years ago

RapidAPI may be requiring an extra step. See the solution to this closed issue: https://github.com/IUNetSci/botometer-python/issues/50

mr-devs commented 4 years ago

As @clayadavis correctly pointed out in his link to #50, because Rapid API visually allows you to see your rapidAPI key without subscribing to any of the Botometer versions (from the "Endpoints" page), users can copy and paste their rapid API key into their own code attempting to utilize the botometer-python package (likely based on the "Quick Start" instructions) prior to subscribing. However, if you have not yet subscribed to any version, you will trigger the requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://botometer-pro.p.rapidapi.com/2/check_account error.

The solution is to go to the Endpoints page (after creating a RapidAPI account), clicking Subscribe to Test, and then selecting whatever version the user prefers.