2015-04-16 38 views
0

我打算在iOS應用中使用Google Places API自動完成功能,因此我在Google Developers Console中設置了Google Places API。但是當我發送HTTP請求時,我收到了拒絕消息。任何想法我失蹤?如何在Google Developer Console中設置Google Places API?

  • 你可以看到谷歌Places API的啓用

enter image description here

  • 我送了一些要求,這是圖表

enter image description here

  • 但請求被拒絕

enter image description here

與此同時,我已經設置了結算信息。

回答

0

也許你沒有使用iOS密鑰創建客戶端ID。請通過以下步驟驗證您是否獲得了正確的密鑰。

  • 通過輸入您的Google憑證訪問Google Developer Console
  • 創建一個項目或選擇一個現有項目。
  • 在左欄中選擇API,在Google Maps API部分中選擇Places API。然後點擊啓用API按鈕,以啓用它。自動填充API和Places API共享相同的密鑰
  • 在左列中選擇Credentials並單擊Create new Key
  • 在對話框中選擇iOS鍵,它將以字符串的形式創建一個iOS鍵。在您的請求中使用此密鑰。

希望這有助於!