Skip to content Skip to sidebar Skip to footer

Proper Way To Perform Get Api Call With Api Key In Header?

I've never really attempted to try and write my own code that calls an API. I have some Python code that I created after discovering Python Requests library. However, I can't get

Solution 1:

If you are calling an API you need to send post :

r = requests.post(url, headers=headers)

Solution 2:

Are you sure you don't have to supply the API key something like this?

{'Auth': 'Token my_key'}

That's how most API's do it, but I can't find any reference to their API docs anywhere.

Post a Comment for "Proper Way To Perform Get Api Call With Api Key In Header?"