2016-06-29 25 views
0

youtube api v3の動画IDを使用してYouTube動画の詳細を取得しようとしています。このURLを使用して:APIキーは、キーは、私はGoogleのデベロッパーコンソールでの私のSHA1コードを使用してアプリを登録した後に得た1ですyoutube api v3(Android)の動画IDを使用して動画タイトルを取得する

{ 
"error": { 
"errors": [ 
{ 
"domain": "usageLimits", 
"reason": "ipRefererBlocked", 
"message": "The Android package name and signing-certificate fingerprint, null and null, do not match the app restrictions configured on your API key. Please use the API Console to update your key restrictions.", 
"extendedHelp": "https://console.developers.google.com/apis/credentials?project=861763996907" 
} 
], 
"code": 403, 
"message": "The Android package name and signing-certificate fingerprint, null and null, do not match the app restrictions configured on your API key. Please use the API Console to update your key restrictions." 
} 
} 

https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=AIzaSyCA-EL5sT5LCQnYauNMm2Ku_PukvBcz6ms%20&part=snippet,contentDetails 

私はのリターンを得ます。このエラーを乗り越えるには?

答えて

2

あなたはあなたがする必要があるmobile.AllからGETメソッドを持つサービスは、サーバーキーを作成して、URLでこのキーと動画IDを追加し、例えばデータに

を取得することであることを確認することができます:あなたが使用している場合JsonOBjectRequestのurlパラメータのHTTPリクエストのVolleyは、次のようになります。

"https://www.googleapis.com/youtube/v3/videos?id=F4HuIqwGuBU&key=YOUR_SERVER_KEY&fields=items(id,snippet(description,channelId,title,categoryId),statistics)&part=snippet,statistics" 

これは役に立ちます。資格情報のあなたのプロジェクト&クリックし ゴー... ( - :

関連する問題