Git Product home page Git Product logo

wobike's Introduction

WoBike

Documentation of Bike Sharing APIs

Public transport and multimodal routing apps could benefit from showing nearby bikes from bikesharing services. So here's a list showing the APIs of a few of these platforms.

Bikes

E-Scooters (🛴, that you stand on)

Scooters/Mopeds (🛵, that you sit on)

Cars

Dead (e.g. bankrupt)

More...

Todo

Some new providers are listed in issues with the new provider tag. Some of them are already documented there and just need to be put in an own file in this repo.

wobike's People

Contributors

bastelpichi avatar bransonf avatar dschep avatar hbruch avatar ifmon avatar jkamue avatar josephjvb avatar kospl avatar lene avatar lm41 avatar lucmartinon avatar manaphy91 avatar mo-official avatar monsieurhannes avatar pachacamac avatar pierrickp avatar ricffb avatar robbi5 avatar salanza avatar samip5 avatar sheilnaik avatar smile4ever avatar song940 avatar tiphedor avatar ubahnverleih avatar w1mmer avatar waquner avatar will83 avatar william04a avatar yazsir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wobike's Issues

Bird API returning empty results

Hey,

Thanks all for starting this project. I am attempting to make some calls based upon location for the Bird API through Postman. My first call to get me my id and token worked just fine, however when requesting based upon latitude and longitude and following the instructions. I receive blank JSON, any tips?
Get Request

https://api.bird.co/bird/nearby?latitude=35.789228&longitude=-78.674706&radius=1000

Headers

[{"key":"Authorization","value":"Bird <token> ","description":""},
{"key":"Device-id","value":"ee2cc530-1382-4e6f-9a97-dfe4859d145b","description":""},
{"key":"App-Version","value":"3.0.5","description":""},
{"key":"Location","value":"{\"latitude\":35.789228,\"longitude\":-78.674706}","description":""}]

Result

{
    "birds": [],
    "clusters": [],
    "areas": []
}

Thanks for your help!

Bird expiration date ?

in the documation it's written that the token could expire.
After first login, api return a JWT. Decode it, there are a exp timestamp of 1 year.
Re-call login endpoint, the api return you a new expiration date (2 hours).

But in my tests, after first login and wait 2 hours, token is still valid and
after login then re-call login, token doesn't expire after 2 hours.

Did someone had expiration on tokens ?

O-bike bike list API returns

GET https://mobile.o.bike/api/v1/bike/list?latitude=<LATITUDE>&longitude=<LONGITUDE> returns error message for me:

{
    "data": {
        "code": 500,
        "error": "Server is busy,please try later"
    },
    "success": false,
    "errorCode": 400
}

Any idea? Thanks.

Bird POST Token

Using the instructions provided, the response to my POST request at the Bird API didn't include a JWT in the response. As mentioned in #32 there is just a value of an expiration date, such as below:

{'id': 'd9b7a40f-59f6-4c94-ae47-e13a5d5d8b74', 'expires_at': '2018-06-23T18:34:51.331Z'}

Is the token provided somewhere else and I am just missing it?

[Gobee.Bike] Number of bikes & docks

Would you know if there's another API call parameter to retrieve more bikes, perhaps depending on a radius or on a count ? With the app map, there seems to be a different number of bikes retrieved - depending on the map zoom.

Also would you know the API call to retrieve the list of public docks where it's authorized to park a bike ?

I tried to decompile the APK, but the decompilation fails with dex2jar.

Invalid param

Hi I'm trying to integrate ofo following this instructions and the response in the first endpoint (verifyCode_v2) is the following. Any help? :) Thanks!

{
"errorCode": 40001,
"msg": "Invalid param",
"values": {}
}

[Limebike] request URL does not work with co-ordinates changed.

https://web-production.lime.bike/api/public/v1/views/bikes?map_center_latitude=37.7604&map_center_longitude=-122.4398&user_latitude=37.7604&user_longitude=-122.4398

Whenever I try to swap out the latitude and longitude I just get an empty list:

https://web-production.lime.bike/api/public/v1/views/bikes?map_center_latitude=66.117844&map_center_longitude=-80.507813&user_latitude=37.7604&user_longitude=-80.507813

{"data":{"id":"views::publicbikesview","type":"public_bikes_view","attributes":{"nearby_locked_bikes":[],"default_bike_icon":{"id":"1","type":"icons","attributes":{"url":"https://d22d5yy1i19g9i.cloudfront.net/icons/default_pin.png?fingerprint=821a3e688143dfcebac869d8f9e4b97b","description":"","description_icon_url":null,"description_link_url":null}},"cluster_icon":{"id":"2","type":"icons","attributes":{"url":"https://d22d5yy1i19g9i.cloudfront.net/icons/default_cluster.png?fingerprint=23bbfa670fea1998a61b91512c1a15d9","description":"","description_icon_url":null,"description_link_url":null}}}},"meta":{"min_ios_version":"1.4.1","min_android_code":19,"flags":"IOS_VERSION_V1.0,ANDROID_VERSION_V1.0","groups":[]}}

DC Jump Bike Wrapper

I created a basic wrapper for Jump Bike D.C's open data API. Would you mind adding it and possibly pointing me in a direction on how to upload it to PyPi?

HTTP 405 Method Not Allowed (Bird API)

Hey. I'm not really sure what I am doing wrong here. I appreciate any help.

This is pertaining to the bird API. Getting "HTTP 405 Method Not Allowed". This is my python code:

guid=str(uuid.uuid4())
headers={"Device-id": guid, "Platform": "ios","Content-Type": "application/json"}
data = {"email": ""}
response = re.get('https://api.bird.co/user/login', data=data,headers = headers)
data = json.loads(response.text)

[oBike] New API: v2/bike/list

Apparently, the oBike API has changed, calling https://mobile.o.bike/api/v1/bike/list?latitude=48.1481&longitude=11.5755 always returns:

<code>500</code>
<error>Server is busy,please try later</error>
</data>

Looking at the code of com.obike_2.5.4.apk, there's a new method POST with a JSON object to retrieve geolocation-based bikes:

package com.obike.p054c.p059a;

import android.support.v4.util.ArrayMap;
import com.google.gson.Gson;
import com.obike.OBikeApp;
import com.obike.model.bean.BikeInfo;
import com.obike.p053b.C4737b;
import com.obike.p054c.C5363b;
import com.obike.utils.C5507d;
import com.obike.utils.C5566x;
import com.obike.utils.ag;

/* compiled from: GetAllBikeListTask */
public class ah extends C5363b<BikeInfo> {
    private String f15121a = "";

    public ah(String str, String str2) {
        Object arrayMap = new ArrayMap();
        arrayMap.put("longitude", str);
        arrayMap.put("latitude", str2);
        int i = 0;
        try {
            i = Integer.parseInt(C4737b.m18231a(C5566x.m22328a(OBikeApp.m18078a(), ag.m21743a().m21837z())));
        } catch (Exception e) {
        }
        if (i > 0) {
            arrayMap.put("countryCode", Integer.valueOf(i));
        }
        arrayMap.put("dateTime", System.currentTimeMillis() + "");
        arrayMap.put("deviceId", C5507d.m22050d(OBikeApp.m18078a()));
        this.f15121a = new Gson().toJson(arrayMap);
    }

    public int getRequestType() {
        return 11;
    }

    public String getParams() {
        return this.f15121a;
    }

    public String getUrlName() {
        return "v2/bike/list";
    }

    protected boolean isRepeat() {
        return true;
    }
}

Trying with curl I still get that error:

curl -H "Content-Type: application/json" -X POST -d '{"latitude":22.5376, "longitude":114.0577, "dateTime":1514217345708, "deviceId":"90106918-e98d-11e7-80c1-9a214cf093ae"}' https://mobile.o.bike/api/v2/bike/list

{"data":{"code":500,"error":"Server is busy,please try later"},"success":false}

I'm using a generated GUID as the deviceId.

Would someone know what's missing in that request (apart the countryCode which looks optional) ?

Not Getting Token From Bird

URL = "https://api.bird.co/user/login"
data = {"email": "[email protected]"}
headers = {"Device-id": "4db3bd94-308c-493b-a6fa-1e8398a376ab", "Platform": "ios", "Content-type": "application/json"}
r = requests.post(url = URL, headers=headers, json=data)
response = json.loads(r.text)
print(r.text)

Results in the following:
{"id":"b037424f-05d7-495d-83c3-980c7ec7dd8a","expires_at":"2019-01-24T22:55:24.804Z"}

There is no token given.

[Ofo] Fetching the token

According to these python scripts, there's a way to retrieve the Ofo token.

def get_token(tel, code):
    """
    获取登录时返回的token
    :param tel: 手机号
    :param code: 短信验证码
    :return: token
    """
    url = 'http://san.ofo.so/ofo/Api/login'  # 获取token地址
    headers = {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, '
                             'like Gecko) Mobile/14E304 MicroMessenger/6.5.7 NetType/WIFI Language/zh_CN'}
    parameter = {"tel": tel, "code": code}
    token = requests.post(url, headers=headers, data=parameter, verify=False).text
    return json.loads(token)["values"]["token"]

I've installed the app, registered to the service, removed the app, reinstalled it, and then entered into the login process again. Once I've received the SMS, I've tried unsuccessfully several combinations of types of the following request

curl -H "Content-Type: application/json" \
  -X POST -d '{"tel": "+336xxxxxxxx", "code":xxxx"' \
  http://san.ofo.so/ofo/Api/login

or

curl -H "Content-Type: application/json" \
  -X POST -d '{"tel": "336xxxxxxxx", "code:xxxx' \
  http://san.ofo.so/ofo/Api/login
{"errorCode":20001,"msg":"手机号不合法","values":{}}
## 手机号不合法: "Phone number is not valid" (according to Google Translate)

Would someone have better luck ?

Grepping the code, not sure that method is still valid, or if it applies to login from other countries than China, though.

I still haven't found a way to get an Ofo token, I'd rather avoid using Mitmproxy (not sure how complicated it is to setup).

Completeness of Nextbike data?

I am experimenting with the Nextbike data right now.

Digging through the data, I noticed that the maximal number of bikes at a given location and time for two tested cities does not exceed 5. That's very suspicious since there should be stations that have more than 5 bikes.

This raises the question if the data is reliable by any means.

Does anybody maybe have some information on what is published under the Nextbike API? Is the really the full data?

Bird: API Call returns 404

When firing a cURL request via my local machine I get a valid 200 response, when using the exact same cURL call via an AWS instance I get a 404 response code.

Here's my cURL request:

curl -I -X GET \
 'https://api.bird.co/bird/nearby?radius=1000' \
 -H 'App-Version: 3.0.5' \
 -H 'Authorization: Bird <MY_TOKEN_HERE>' \
 -H 'Cache-Control: no-cache' \
 -H 'Device-id: 123E4567-E89B-12E3-A452-426655440000' \
 -H 'Location: {"latitude":33.754709,"longitude":-84.390793,"altitude":500,"accuracy":100,"speed":-1,"heading":-1}'

Any ideas why?

number of GUIDs constantly growing

getting scooter data via API on daily basis gives more and more unique IDs (GUIDs) in total. does each scooter forever represented by same GUID (or pair of GUID + code) or same scooter may have new GUID some (next) day?

No longer seeing bird ID

Just started happening a few hours ago. API no longer pulls the bird scooter ID. Anyway around this?

[gobee.bike] unavailable endpoint

http://aws.gobee.bike is not the application's endpoint and sometime it's down (like now -_- )

It's probably for partners or data analysis but not used on the mobile application.
We should try to get a more reliable endpoint

Edit: it's back

final response - blank list of birds, clusters and areas

Hi, thank you for this awesome work.

I am trying to get some insight into student schedules and how bikes are being used on my college campus.

I have followed the document, but unfortunately, I am getting empty lists:
{'birds': [], 'clusters': [], 'areas': []}

Do you know why this is happening?

Lyft scooters

Any leads on an api for the new Lyft scooters in Denver?

bird api returning error Something went wrong

Any query i make to the bird api returns an error {u'message': u'Something went wrong', u'code': 500}

Is there something incorrect with the following request?

# token response is valid
{u'token': u'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBVVRIIiwidXNlcl9pZCI6IjQ3Y2UyY2YxLWM4MTAtNDI2Ni1iN2I5LWRjMDhlZGIxZTNlZiIsImRldmljZV9pZCI6Ijc3NTFEMTEwLUZCQkYtNDBFNi1CRDgzLUQ5NzRFOTYwRkQwRCIsImV4cCI6MTU2MTQyNTUxM30.Pv3oWUoJEuowq_eOZ4mIq3Ym30NM083Z7ROdp75DgtI', u'id': u'a8f3754f-b700-4152-b715-7d7baf5ec129'}

# url
'https://api.bird.co/bird/nearby?latitude=37.77184&longitude=-122.40910&raduis=1000'

# headers
{'Device-id': '7751D110-FBBF-40E6-BD83-D974E960FD0D', 'Location': '{"altitude": 500, "longitude": -122.4091, "latitude": 37.77249, "speed": -1, "heading": -1, "accuracy": 100}', 'Authorization': u'Bird eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBVVRIIiwidXNlcl9pZCI6IjQ3Y2UyY2YxLWM4MTAtNDI2Ni1iN2I5LWRjMDhlZGIxZTNlZiIsImRldmljZV9pZCI6Ijc3NTFEMTEwLUZCQkYtNDBFNi1CRDgzLUQ5NzRFOTYwRkQwRCIsImV4cCI6MTU2MTQyNTUxM30.Pv3oWUoJEuowq_eOZ4mIq3Ym30NM083Z7ROdp75DgtI', 'App-Version': '3.0.5'}

# response
{u'message': u'Something went wrong', u'code': 500}

Can't get bikes

When I request (GET) to the mentioned link, with parameters and headers, it return me 401 error, but token is not null.

Request interface
@Headers({ "Device-id:43ba174c-11f4-4918-9fcc-6d785cfc256e", "App-Version:3.0.5" }) @GET("/bird/nearby?latitude=37.77184&longitude=-122.40910&radius=1000") Call<BirdResponse> getBirds(@Header("Authorization") String token, @Header("Location") Map<String, String> params);

MainActivity.java

`Map<String, String> requestParams = new HashMap<>();
requestParams.put("latitude",lat);
requestParams.put("longitude",lng);
requestParams.put("altitude","500");
requestParams.put("accuracy","100");
requestParams.put("speed","-1");
requestParams.put("heading","-1");

    apiCallsInterface.getBirds(AUTH_TOKEN,requestParams).enqueue(new Callback<BirdResponse>() {
        @Override
        public void onResponse(Call<BirdResponse> call, Response<BirdResponse> response) {
            Log.d(TAG,"" + response.code());
        }

        @Override
        public void onFailure(Call<BirdResponse> call, Throwable t) {

        }
    });`

MoBike information is outdated

When accessing the URL given in the example, HTTP status 500 is returned.
I could make the following work (thanks to https://github.com/PierrickP/multicycles/blob/master/providers/mobike/src/index.js for figuring this out):

curl --request POST \
     --url http://app.mobike.com/api/nearby/v4/nearbyBikeInfo \
     --header 'platform: 1' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --header 'User-Agent: Mozilla/5.0 (Android 7.1.2; Pixel Build/NHG47Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.9 NTENTBrowser/3.7.0.496 (IWireless-US) Mobile Safari/537.36' \
     --data 'latitude=52.53109267391138&longitude=13.384896838881986'

The response format has also changed:

{
  "code": 0,
  "message": "",
  "bike": [
    {
      "distId": "A816022662",
      "distX": 13.385467,
      "distY": 52.530976,
      "distNum": 1,
      "distance": "40",
      "bikeIds": "A816022662#",
      "biketype": 2,
      "type": 0,
      "boundary": null,
      "operateType": 2
    },
    ...
  ],
  "mpl": [],
  "biketype": 0,
  "radius": 500,
  "autoZoom": false,
  "hasRedPacket": 0
}

Need help for Mobike and ofo

Hi, I've failed to get return value on both Mobile and ofo. Please help.

  1. ofo, I have no idea where should I register for the "token"
    {
    "errorCode": 10003,
    "msg": "You logged in ofo on another device.",
    "values": {}
    }

  2. Mobike, I've followed your every steps, including Referer to https://servicewechat.com/ on header. But still error 403.

Padding used in AES-128 for Obike

Hi! Thanks a lot for doing this! Can I check what is the padding used in AES-128 for the Obike API? With the example given, my resulting input to the AES encryptor is only 103 characters long.

Response 200 issue for bird api

Below is the python code I used. I get a response 200 error. Could somebody tell me where could have gone wrong? Thanks!

import requests
import json


headers = {"Device-id": "123E4567-E89B-12D3-A456-426655440060", "Platform": "ios", "Content-Type": "application/json"}
login = {"email": "[email protected]"}
response = requests.post('https://api.bird.co/user/login', json=login, headers=headers)
login = json.loads(response.text)

token = login["token"]

headers2 = {"Authorization": 'Bird' + ' ' + token,
            "Device-id": "123E4567-E89B-12D3-A456-426655440060",
            "App-Version": "3.0.5",
            "Location": json.dumps({"latitude":33.781105,"longitude":-84.3863329})}

results = requests.get("https://api.bird.co/bird/nearby?latitude=33.781105&longitude=-84.3863329&radius=100", headers = headers2)

Out[27]: <Response [200]>

Donkey Bike API

Get all available hubs:

GET https://stables.donkey.bike/api/public/availability/hubs?location=48.1417855%2C11.5536426&radius=1595

[
    {
        "available_bikes_count": 2,
        "country_code": "DE",
        "currency": "EUR",
        "id": 4606,
        "latitude": "48.1422939",
        "longitude": "11.5494365",
        "name": "Hackerbruecke",
        "prices": {
            "1440": 1400,
            "30": 175,
            "720": 1190
        },
        "radius": 20,
        "thumbnail_url": "https://donkey-production.s3.amazonaws.com/uploads/hub/image/4606/PHOTO-2018-09-29-10-14-13_thumbnail.jpg"
    },
...
]

Details about one hub:
GET https://stables.donkey.bike/api/public/hubs/4606
Accept: application/com.donkeyrepublic.v2,application/json

{
    "available_bikes_count": 2,
    "city_id": 103,
    "formatted_flex_price": "€0,00",
    "formatted_theft_insurance_price": "€2,00",
    "hero_picture_url": "https://donkey-production.s3.amazonaws.com/uploads/hub/image/4606/PHOTO-2018-09-29-10-14-13_hero.jpg",
    "id": 4606,
    "latitude": "48.1422939",
    "long_description": "",
    "longitude": "11.5494365",
    "name": "Hackerbruecke",
    "radius": 20,
    "support_flex": true,
    "support_theft_insurance": true,
    "thumbnail_bw_url": "https://donkey-production.s3.amazonaws.com/uploads/hub/image/4606/PHOTO-2018-09-29-10-14-13_thumbnail_bw.jpg",
    "thumbnail_url": "https://donkey-production.s3.amazonaws.com/uploads/hub/image/4606/PHOTO-2018-09-29-10-14-13_thumbnail.jpg"
}

Locations where a bike rented from this hub can be given back:
GET https://stables.donkey.bike/api/public/availability/hubs/4606/dropoffs
Accept: application/com.donkeyrepublic.v2,application/json

[
    {
        "free_spots_count": 4,
        "id": 4102,
        "latitude": "48.1320037",
        "longitude": "11.5801377",
        "name": "Baaderstrasse/Kohlstrasse",
        "radius": 20
    },
...
]

Lime juicer api

Hello guys,
Where is the juicer api ? there is only the rider's one.
How could you intercept the requests. I tried to do this with several tools but I couldn't explore fully the requests it seems protected or sthg ..

The client failed to negotiate an SSL connection to web-production.lime.bike:443: Remote host closed connection during handshake

Does lime app have SSL pinning ?
Please help !!

LimeBike API 404 Error

It looks like LimeBike has shut off their API, or at least this endpoint. web-production.lime.bike is returning 404 errors ("The page you were looking for doesn't exist.")

R submit post request doesn't return id or token

Hi! I am not very familiar with Python so I use R to try submit the POST request. Here is the code that I used.

library(httr)

res <- POST("https://api.bird.co/user/login", body = "[email protected]", add_headers("Device-id"="2C97E8DD-0180-40F7-865F-9A8D1886901D",
                                                                        "Platform" = "ios",
                                                                        "Content-type" = "application/json"))

Created on 2018-09-14 by the reprex
package
(v0.2.0).

It return me with this object, but I can't find id or token in it.
screen shot 2018-09-14 at 4 37 30 pm
screen shot 2018-09-14 at 4 37 59 pm

Can anybody tell me where I am doing it wrong? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.