MapQuest API key no longer working

…衆ロ難τιáo~ 提交于 2019-12-12 21:04:41

问题


We have been using a MapQuest API key for a few years now but at some point in the last 24hrs or so the maps have stopped working and we are getting an error: "This key is not authorized for this service."

I logged in and it appeared our old key was removed and automatically generated a new key for the new Open Maps API.

I have since waited over an hour and still this new API key is giving this error message.

Does anyone know what the story is?


回答1:


It seems like they have changed the URL for their API and failed to keep the old one operational. -Even in the AppKey manager they still reference the old URL yet looking in the new SDK documentation the API url has changed to a new subdomain.

To resolve my issue, I changed the URL for the MapQuest Javascript library from http(s)://mapquestapi.com/ to http(s)://open.mapquestapi.com/

You can use either http:// or https:// depending on whether you prefer performance or security.

The end result, at least for their Javascript SDK, should look something like this:

<script src="https://open.mapquestapi.com/sdk/js/v7.2.s/mqa.toolkit.js?key=<%= APIKey %>" type="text/javascript"></script>

EDIT: I also needed to use the new API key that was so kindly 'given' to me to replace the old one. Seems like they didn't pull all the old API keys accross and simply issued new ones to everone in response to their licensing changes.



来源:https://stackoverflow.com/questions/28446162/mapquest-api-key-no-longer-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!