Instantly share code, notes, and snippets.

@d4l3k /reference.md
Last active Sep 20, 2018

Embed
What would you like to do?
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