Forums

Accessing API On a Password Protected Site

Hello,

Right now I have an API on pythonanywhere that I access via the requests library. It's on a test site that I would like to password protect, but when I do this the API request no longer works.

I'm assuming I have to pass in the login info when I make the API call, but I don't know what configuration is required for the way pythonanyhwhere has it setup.

Any help is recommended please.

Different API libraries/frameworks have different methods of authorization. Maybe check the docs of the one you use.