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

CORS error with Lyft API endpoint #14

Open
alulsh opened this issue Dec 27, 2021 · 0 comments
Open

CORS error with Lyft API endpoint #14

alulsh opened this issue Dec 27, 2021 · 0 comments

Comments

@alulsh
Copy link
Owner

alulsh commented Dec 27, 2021

The District Department of Transportation (DDOT) lists https://s3.amazonaws.com/lyft-lastmile-production-iad/lbs/dca/free_bike_status.json as a public API endpoint for Lyft scooters on its dockless API page. Lyft also lists this endpoint on their public FAQ for service in Washington, DC:

Screen Shot 2021-12-27 at 12 50 13 PM

You can freely view this API endpoint in a web browser by visiting https://s3.amazonaws.com/lyft-lastmile-production-iad/lbs/dca/free_bike_status.json in a web browser:

Screen Shot 2021-12-27 at 12 29 37 PM

Curl requests like curl "https://s3.amazonaws.com/lyft-lastmile-production-iad/lbs/dca/free_bike_status.json" | jq '.data.bikes[2]' also succeed with no issues:

Screen Shot 2021-12-27 at 12 28 18 PM

When you try to hit this API endpoint with client-side JavaScript via fetch or XMLHttpRequest you receive a generic CORS error. As a result, this API is unusable for front end web applications.

Screen Shot 2021-12-27 at 12 09 33 PM

Lyft does maintain developer documentation, but you must contact your Lyft Business contact for full access. Also, this developer portal appears to be for Lyft's traditional rideshare service, and not its micromobility services.

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

No branches or pull requests

1 participant