2014-11-05 175 views
1

我一直在使用YouTube API掙扎,現在我被卡住了。使用Youtube API v3發生「accessNotConfigured」錯誤

我所做的是:

  1. 在谷歌開發者控制檯創建一個項目(https://console.developers.google.com
  2. 啓用 「YouTube數據API V3」 enter image description here
  3. 產生的iOS API密鑰。 enter image description here
  4. 訪問https://www.googleapis.com/youtube/v3/search?key= {API KEY} &部分= ID & Q =通過網頁瀏覽器足球得到了錯誤消息 enter image description here

我缺少的東西? 我已經閱讀了很多問題,但仍然無法解決。

回答

0

在步驟3 「生成IOS API密鑰」,在谷歌開發者控制檯網頁上的評論說

Use of this key does not require any user action or consent, does not grant access 
to any account information, and is not used for authorization. 

點擊*瞭解更多」按鈕,它說:

Use an API key when your application is running on a server and accessing one of the following kinds of data: 
•Data that the data owner has identified as public, such as a public calendar or blog. 
•Data that is owned by a Google service such as Google Maps or Google Translate. (Access limitations may apply.) 

我認爲您需要使用OAuth過程而不是API密鑰。點擊瞭解詳情位於開發者控制檯網頁的OAuth部分,以瞭解如何在Apple iOS中使用OAuth。

要爲iOS創建oAuth憑據:

Create new Client ID/Installed Application/iOS 
+0

感謝您的回覆。我一直在努力去做,但我現在有另一個問題。請稍等一下。 – tomo 2014-11-08 15:06:37