Skip to content

Instantly share code, notes, and snippets.

@max-mapper
Created September 1, 2021 00:07
Show Gist options
  • Save max-mapper/ad285fea687a710d829a8d4a1c8a732e to your computer and use it in GitHub Desktop.
Save max-mapper/ad285fea687a710d829a8d4a1c8a732e to your computer and use it in GitHub Desktop.
Metro Micro API (RideCo API)

i downloaded the metro micro APK, extracted it, and then unminified the ionic JS source code, then reverse engineered these calls using my own username/password

# get a token
curl -H "Accept: application/json; version=rccmtp-2.18.0" -X POST https://api.metro-micro.net/api-token-auth/ -F "username=youremail" -F "password=yourpass"

# get geocode results
curl -H "Accept: application/json; version=rccmtp-2.18.0" -X GET "https://api.metro-micro.net/rest/geo/places/autocomplete/?value=yourtexttogeocode&session_token=$MICRO" -H "Authorization: Token $MICRO"

# get a trip/ride id
curl -H "Content-Type: application/json" -H "Accept: application/json; version=rccmtp-2.18.0" -X POST "https://api.metro-micro.net/rest/website/search/" -H "Authorization: Token $MICRO" --data '{"legs":[{"modifier":1,"passengers":1,"date":"2021-08-31","time":"16:35","origin_location":"<geocode address field>","origin_name":"<geocode name field>","origin_address":"<geocode address field>","origin_latitude":lat,"origin_longitude":lng,"destination_location":"<geocode address field>","destination_name":"<geocode name field>","destination_address":"<geocode address field>","destination_latitude":"lat","destination_longitude":"lng"}],"type":1}'

# check a trips availability
curl -H "Content-Type: application/json" -H "Accept: application/json; version=rccmtp-2.18.0" -X GET "https://api.metro-micro.net/rest/website/search/leg/options/?trip=tripid&leg_request=legid&leg_chosen_status=1" -H "Authorization: Token $MICRO"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment