2013-04-17 18 views
11

を使用して拒否された要求:GoogleマップのジオコーディングAPIは - 私は次のようにGoogleのAPIのジオコードサービスを使用しようとしているAPIキー

https://maps.googleapis.com/maps/api/geocode/json?&address=melbourne&key=xxx&sensor=false 

私が得る応答は常にある:私が持っている

{ 
    "results" : [], 
    "status" : "REQUEST_DENIED" 
} 

両方のGoogleマップAPI v3とPlaces APIサービスが有効になっています。私は請求を設定しています。私は多数のキーを削除して再作成しようとしました - すべて同じ効果です。私は、同じ結果で、異なるネットワークからサービスを試しました。

Google APIダッシュボードのレポートセクションには、リクエストの蓄積数が表示されますが、応答は常にRequest_Deniedです。

誰でも手助けできますか?

+3

ようgoogleapisソースを変更します。それはそれなしで動作します:https://maps.googleapis.com/maps/api/geocode/json?&address=melbourne&sensor=false – Shervin

+0

ええ、私は知っている...しかし、要求は1日1000に制限されており、それ。キーは1日に25000件のリクエストを許可し、その後にリクエストを支払うことを意味します。キーを取得する必要があります。 –

+0

このAPIは[Maps API for Business](https://developers.google.com/maps/documentation/business/webservices)の顧客のみが利用できます。 Google Maps Javascript v3の[ジオコーディングライブラリ](https://developers.google.com/maps/documentation/javascript/geocoding)をご覧ください。 – Brett

答えて

19

"ステータス": "REQUEST_DENIEDは" 場所APIによって返されたとき:私はホワイトリスト私の本番サーバのIPアドレスに失敗した

You have not activated the Places API Service in the services tab of the APIs console. 
The key parameter is missing from your request. 
The key parameter does not match the your API key in the API Access tab of the APIs console. 
Your API key has not been correctly set up in the API Access tab of the APIs Console: 
If you are using a Browser key, check that your allowed Referer(s) are correct. 
If you are using a Server key, check that your allowed IP(s) are correct. 
Android and iOS keys are not supported, please use a Browser or Server key. 
The request was not sent as an HTTPS request, HTTPS is required for all Web Service requests. 
The incorrect HTTP method was used to send the request: 
All requests must be sent as a GET request except for Place Actions. 
All Place Actions must be sent as a POST request. 

https://developers.google.com/places/faq#why_do_i_keep_receiving_status_request_denied

+0

AndroidとiOSのキーがサポートされていない場合は、まず最初にそれらを作成することができます! –

+0

@MarcoLuglio他のGoogle APIでは、これらのタイプのキー(Google Cloud Vision APIなど)を使用できるためです。しかし、私はそれが混乱していることに同意します。 – thijsonline

0

ジオコーディングの単純なHTTPクエリではキーが機能しないようです。 Googleはデータの再利用を禁止しています。 「;禁止されている地図上にそれらを表示せずに ジオコーディングの結果ジオコーディングAPIは、Googleマップと組み合わせて使用​​することができる。」

"Usage Limits"を参照してください。

hereのようにJavascript APIを使用して結果をマップに読み込むことができます。

0

のみ `key`を失うこの

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places"></script> 
関連する問題