I’m relatively new to using Mapillary API. But have been successfully extracting trace data from a bounding box. I have previously had success in the past using the https://tiles.mapillary.com/maps/vtp/mly1_public api to extract sequence ids. However, as of today at about 10:30am (British summer time) I have been receving a html response instead of the expected json response. I still receive status code 200 when making the get request. But my response content looks like this:
Where my access token is generated each run, and has worked in the past even earlier this morning. (I will try a different api request to check if the access token is the issue now)
I believe this api request has the html response no matter the parameters I use. I at first thought it was a rate limiting issue but I’ve seen in the docs that I should be receiving status code 4xx not 200.
I’ll test my access token with other api requests and reply again
@abalys
Perhaps I spoke to soon… I have now made another attempt to make the same api request, the difference only being that I have a new access token generated (as my program was generating one on startup, which I am now stopping doing and just maintaining the same one). Now a request with any tiles and any zoom produces the same html response,
are examples where that html response with status 200 is reproduced. Though it is happening with every request.
The thing that confuses me the most, is that it seems to be something with the access token as that is the only thing that has changed, however when the error was initially being thrown, it was midway through iterating over a bounding box, and was making the same api gets with the same access token.
I have tested with the getting traffic signals api:
The Mapillary API was always quite unstable since the transition to v4. Best is to retry. In my scripts I do up to ten attempts, with increasing sleeps between the attempts. Most of the time this is enough, but not always.
The thing is that I haven’t experienced this problem since before yesterday. And now it is not just failing more often than not, I haven’t seen it succeed in the last 30+ requests I have made. It would be nice to close off that this is a problem on my side at least and that this is a fix that I need to wait for?
Doing this is also failing, however, this morning it was working again, so I ran my program, and got 80% of the way through the UK (previously i had gotten 60%), before it failed (as in html response but with 200 status code). Once it had failed, it was then failing on all tiles, even ones that had been done before. I tried using a second account after this one kept failing, and the second account was also failing. I wonder whether there is some IP rate limiting, that may not be updated to return a 4xx status code instead of 200?
Yes, all three parts together form the token. You can read up on our rate limits here: API Documentation The rate limit for tiles is 50,000 requests per day.
Still not getting a valid response, I don’t think it is rate limiting as it hasn’t worked once today so far.
The fact that sometimes it works and sometimes it doesn’t suggests to me that it is not an issue with my request itself. If it isn’t rate limiting, and requests such as: https://tiles.mapillary com/maps/vtp/mly1_public/2/14/8022/5155?access_token={}
is working for anyone else, then I’m unsure what could be wrong if I’m getting the status 200 code as well, but just a html response.
Rate limits reset every 24 hours so check back later. I tried fetching the tile URL you provided and it works so I think you’ll be able to access it later.
Yep, it’s started to work again, so looks like a rate limiting issue. Do you know how to flag to the developers that there might be a bug in the api that the status code is coming back as 200 when the rate limit is reached, and the error message is not displayed?