2015-02-05 76 views
2

我一直在關注this tutorial來創建Youtube應用程序..我創建了Browser-Android API密鑰並嘗試了它們兩個我的項目。但是,當我嘗試運行它和搜索,我得到:YouTube Api - 無法搜索:com.google.api.client.googleapis.json.GoogleJsonResponseException:403禁止

Could not search: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden 
{ 
    "code" : 403, 
    "errors" : [ { 
    "domain" : "usageLimits", 
    "message" : "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.", 
    "reason" : "ipRefererBlocked", 
    "extendedHelp" : "https://console.developers.google.com" 
    } ], 
    "message" : "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed." 
} 

任何想法..?

+0

我做了,我確定它是正確的..:S – 2015-02-06 00:04:14

回答

1

通過將瀏覽器api的引用者設置爲允許的引用者來解決問題。

+0

我有API密鑰和serch EngineId,但我有錯誤。所以我認爲在我的情況下是否需要填寫結算信息。 – 2016-05-30 10:46:45

+0

是否需要填寫帳單信息才能使用API​​? – 2016-05-30 10:47:27

2

所有你所要做的就是: 刪除/編輯查閱情況爲「任何參照允許」從 「鍵瀏覽器應用程序」一節。

0

將其設置爲「允許任何引用者」很容易,因爲它將刪除所有引用者允許的輸入。