Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bird returns made-up data #242

Open
LewisHein5 opened this issue May 31, 2022 · 2 comments
Open

Bird returns made-up data #242

LewisHein5 opened this issue May 31, 2022 · 2 comments

Comments

@LewisHein5
Copy link

LewisHein5 commented May 31, 2022

Even when closely following the instructions in Bird.md and using the User-agent as instructed the query to nearby returns location data that is in a straight diagonal line to the NE from the given latitude and longitude.

image

Here is the code used:

using HTTP
using JSON

latitude = 41.317332
longitude = -105.579342

searchRadius = 5000

locationDict = Dict("latitude" => "$latitude",
                    "longitude" => "$longitude",
                    "altitude" => "7200",
                    "accuracy" => "10",
                    "speed" => "-1",
                    "heading" => "-1")

locationsReqHeader = Dict("Authorization" => "Bearer $accessToken",
                          "Device-id" => devID,
                          "User-agent" => userAgent,
                          "Platform" => "ios",
                          "legacyrequest" => "false",
                          "App-Version" => appVersion,
                          "Location" => JSON.json(locationDict))

locationsReqURL = "https://api-bird.prod.birdapp.com/bird/nearby?latitude=$latitude&longitude=$longitude&radius=$searchRadius"

birdLocationsRequest = HTTP.request("GET", locationsReqURL, locationsReqHeader)

Code to obtain a new token has been omitted for brevity.

User-agent and appVersion are defined as follows:

appVersion = "4.190.0.4"
userAgent = "Bird/$appVersion(co.bird.ride; build:3; iOS 14.3.0) Alamofire/5.2.2"
@LewisHein5
Copy link
Author

Also, this seems to be the same issue as #192 so I guess that issue is back?

@BastelPichi
Copy link
Contributor

Works for me with the ua in the readme.

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

No branches or pull requests

3 participants