I’m working through the Scientific Computing with Python course and trying to get example code (video linked below) working with a Twitter API.
Here’s my repl: https://replit.com/@igorgetmeabrain/API-Testing
All of this code is taken from the video and from related resources at https://www.py4e.com/code3/
.
I managed to get the previous example (Google Maps API) to work, using an API key (i.e. the code I commented out in main.py
). When I try to access the Twitter API though, I get a 403 (Forbidden) error. I believe this means that my request is properly formed but just denied for some reason?
I have no experience of working with APIs like this and only a rudimentary knowledge of Python, so this is pretty advanced stuff in the context of a beginner Python course. I could put a pin in it and move on, but if anyone can shed any light on this, I’d be most grateful, thanks.