2015-04-02 69 views
2

我正嘗試使用Youtube API從特定頻道獲取所有視頻。我在Google Developers Console中設置了該項目並獲得了API瀏覽器密鑰。我啓用了YouTube數據API v3,爲了安全起見,我啓用了YouTube Analytics API。帶AFNetworking的Youtube API失敗

我不知道我得到這個錯誤。誰能幫我。這是我的控制檯輸出。

"error": { 
    "errors": [ 
{ 
    "domain": "usageLimits", 
    "reason": "ipRefererBlocked", 
    "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.", 
    "extendedHelp": "https://console.developers.google.com" 
} 
], 
"code": 403, 
"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

您是否在API Access面板中添加了任何包ID到「編輯允許的iOS應用...」?如果你這樣做,把它們全部刪除。 iOS應用程序:現在應該說「允許任何應用程序」。這爲我解決了這個問題。

0

我被告知,這是通過從編輯允許的IP選項中簡單地刪除所有IP來解決的。這使得它不太安全,但它會接受所有的IP之後。

http://i.stack.imgur.com/LSbTL.jpg