WoBike
WoBike copied to clipboard
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?
Looks good to me, should works. Maybe your token is restricted to one IP. Try to login on you AWS instance and use it
Tried the same exact call on a different, non-AWS instance and it works. tried from two different AWS EC2 instances and it returned 404, i think they might be blocking AWS's IP addresses.
Hum, actually i have something identical on my CI (travis, not all the time) Which region do you use ?
for information: https://ip-ranges.amazonaws.com/ip-ranges.json
Checked from N.Virgina and Ireland. Other non-AWS instance does work. it seems they block AWS's EC2 IP ranges.
maybe someone tried to scrape the data from EC2, and they blocked it by blocking the IP ranges?
@ubahnverleih yeah it could be something automatic. The IP range can be working next day
Same thing on my server ip (not AWS) :\
I think they have been auto-blocking IP ranges with high volumes of calls.
They will block IP ranges from time to time. You also have to get new tokens every once in awhile. To do this, you need to pass in a different email address to request the token.