I am trying to access an API with Python but the best I have reached so far is a 401 response (that I am not authenticated).
this is the API:
https://opendata-api.stib-mivb.be/Files/1.0/Gtfs
this is the code I used to get the 401 response:
import requests
response = requests.get("https://opendata-api.stib-mivb.be/Files/1.0/Gtfs")
print (response.status_code)
I tried to understand the code example they give but cant get it:
curl -k -X GET --header "Accept: application/zip" --header "Authorization: Bearer b2ba6c7a35d667564ffa2765aec6ea07" -o ./gtfs.zip "https://opendata-api.stib-mivb.be/Files/1.0/Gtfs"
how to identify with the Consumer key, Consumer Secret , Acess Token I receive (they dont give Access Token Secret) With Tweepy you are also supposed to use Access Token Secret... for example:
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
So there I am stuck...
Any help?
Thanks