- Go to https://opendata.stib-mivb.be/store/subscriptions
- Click on "Generate keys"
- Encode
ConsumerKey:consumerSecret
in Base64 ; you can use https://codebeautify.org/base64-encode to encode it - Replace
BASE64KEY+:+SECRET
by the generated Base64 and run the following command :
curl -k -d "grant_type=client_credentials" -H "Authorization: Basic BASE64KEY+:+SECRET" https://opendata-api.stib-mivb.be/token
The output will be something like :
{"access_token":"FrEfUwavAbUTaqeBUwR7dr3c5eNECutA","scope":"am_application_scope default","token_type":"Bearer","expires_in":3600}
- Replace
TOKEN
by previously generated token and run the following command :
curl -k -X GET --header "Accept: application/zip" --header "Authorization: Bearer TOKEN" -o ./gtfs.zip "https://opendata-api.stib-mivb.be/Files/1.0/Gtfs"
- GTFS data will be downloaded in
gtfs.zip
file !