API access denied

Hi Open Charge Map!
I work at the Data and Analytics Dept. of Brno city in the Czech Republic and we would like to feed your data to our internal platform. When we tried to connect to your API from our internal server we get this message:

Access denied | api.openchargemap.io used Cloudflare to restrict access

However, when we tried the same in our cloud server environment we get the correct expected response and everything works fine. We even allowed your IP address on our side but it did not help. It means that you are somehow blocking our server. We definitely haven’t done anything wrong or did not send excessive requests so it must be some default config or a bug. Would it be possible to get our IP address from the blacklist?

Thank you very much!
Rob

Hi Rob,

It’s unlikely to be something we’ve configured ourselves and is likely something specific to Cloudflare. Which IP are you coming from and what User Agent will the http request use?

We do have a few blocks and filters in place but these have only been applied to requests which flood our API. It is absolutely essential that your system only makes a limited number of requests to our API - many requests per second or many thousands of requests per day are generally not acceptable.

If you require very high volumes of API queries we can discuss further options.

Hi Christopher,
thank you for your response.
We do not require high volumes. Our IP is
185.62.110.76
and the user agent is
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36.
We try to connect to your API from our internal jupyter notebook server. When we try to connect from our cloud jupyter notebook server everything works fine. Comms with other external API and sites works fine. The only problem is with the open chargers and the message we get suggests that you are somehow inexplicably blocking us… which as you say should not be the case.

Thank you for your time and help!

Hi, I can confirm you were one of only 3 blocked IP addresses we have and your access has now been unblocked. Please review your processes to ensure you are caching as much as possible - pulling all of the API data repeatedly will result in an automatic ban so if you have that type of requirement you should consider running your own API mirror or import our data into your own database: GitHub - openchargemap/ocm-export: Export of OCM POI data into one file per POI [Experimental]

We require that all API users use an API Key in order to identify their usage so we can contact them, so it is essential that your API key is associated with a valid contact email address. We will attempt to contact you before permanently banning your access.

I note that we sent a notification to kom***[email protected] in May with the following text:

Your application (with the http user agent “GeoEvent Server 10.9.0”) is making repeated duplicate requests, often multiple times per second. Your IP and API Key will be banned from using the API soon unless you can resolve this issue.

IP users are expected to follow our Fair Use Policy and at a minimum you should never be making duplicate queries consecutively. See https://openchargemap.org/site/develop/api

I have created a subscription payment link for you (or any other API users) if you would like us to lift these API limits for your specific API key. You should ensure the email address is the same on your Open Charge Map profile as this subscription:

https://buy.stripe.com/5kA6ru2Xrb2W4RacMP

hi Chris,
thank you very much for unblocking us. I did some detective work and found out what happened. A colleague of mine at the transportation department tried to connect to the API with the special capability of the server which is meant to be used to connect to high-frequency data sources and send lots and lots of requests. He was not meant to use that component at all. That’s why you have blocked us. He is not that good with IT and his English is pretty bad as well so he was not able to clearly communicate with you what has happened and why it has happened. I would like to apologize on his behalf and on behalf of Brno. We think we will be needing only regular access for now but maybe in the near future, we will switch to higher limits so I think that the subscription you created might come in handy. Thank you very much for your time and effort. You were really helpful.

Enjoy the rest of the day and enjoy the upcoming weekend!

Take care
Rob

1 Like

Hi Rob, no problem, thanks for looking into that.