Skip to content

Instantly share code, notes, and snippets.

@d4l3k
Last active July 25, 2019 19:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d4l3k/d31c9c66c5e5585db56a313a1431c821 to your computer and use it in GitHub Desktop.
Save d4l3k/d31c9c66c5e5585db56a313a1431c821 to your computer and use it in GitHub Desktop.
Dropbike.ca API

Dropbike.ca API Endpoints

Open Source React Native API Reimplementation

This is a reversed engineered API endpoint list from their React Native android app.

Full source code: https://fn.lc/s/dropbike.js

API base: https://dropbike.herokuapp.com

Staging API base: https://dropbike-staging.herokuapp.com

Weirdly enough the Staging API seems to have production data on it.

Basic unauthenticated request:

fetch("" + g + r, {
  method: s,
  body: n,
  headers: babelHelpers.extends({}, e, {
    "Content-Type": "application/json",
    Accept: "application/json",
    "x-dropbike-client-version": "3.1.64",
    "x-dropbike-client-type": o.Platform.OS
  })
})

Unauthenticated Endpoints

getNearbyBikes

GET https://dropbike.herokuapp.com/v3/bikes?lat=49.2606&lng=-123.2460

getNearbyHavens

GET https://dropbike.herokuapp.com/v3/havens?lat=49.2606&lng=-123.2460

getNearbyRegion

GET https://dropbike.herokuapp.com/v3/region_near?lat=49.2606&lng=-123.2460

getSignupRegion

GET https://dropbike.herokuapp.com/v3/signup_region?lat=49.2606&lng=-123.2460

getRegion

GET https://dropbike.herokuapp.com/v3/region/ubc

authenticate

POST https://dropbike.herokuapp.com/v3/authenticate {phone: r}

verify

POST https://dropbike.herokuapp.com/v3/verify {sms_id, uuid: Constants.installationId, code})

devEndTrip

POST https://dropbike.herokuapp.com/v3/end_trip ???

This doesn't seem to do anything other than send an SMS to the user.

devFinalizeTrip

POST https://dropbike.herokuapp.com/v3/finalize_trip ???

Couldn't get this to work, threw an error every time I tried it.

config

GET https://dropbike.herokuapp.com/v3/config

getFAQS

GET https://dropbike.herokuapp.com/v3/faqs

getIntro

GET https://dropbike.herokuapp.com/v3/intro?lat=49.2606&lng=-123.2460&language=en

Authenticated Endpoints

These methods require a x-dropbike-session-id header.

There's a huge number of these so not all of them are listed, pretty easy to pull them out of the source code though.

updateAvatar

POST https://dropbike.herokuapp.com/v3/avatar

fetch(g + "/v3/avatar", {
  method: "POST",
  headers: {
    "x-dropbike-session-id": e,
    "Content-Type": "multipart/form-data"
  },
  body: r
})

getUser

GET https://dropbike.herokuapp.com/v3/user

updateUser

POST https://dropbike.herokuapp.com/v3/user ???

acceptTermsWaiver

POST https://dropbike.herokuapp.com/v3/accept_terms_waiver

startTrip

POST https://dropbike.herokuapp.com/v3/start_trip {lat, lng, plate, scan_type: 'qr'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment