Bir test youtube hesabı oluşturdum. Bu kanalda yüklenen tüm vido'ları kanal kimliğini kullanarak geri almak ve tüm bu vidoları kimlik doğrulaması olmadan kullanıcılara göstermek istiyorum. Aşağıdaki YouTube API sayfasında:Youtube API kanal kimliği kullanılarak bir kanalda yüklenen tüm vidoları getirmek için
https://developers.google.com/youtube/v3/sample_requests#playlists
Ben kanal kimliği ve API KEY kullanarak tüm yüklenmiş videoları getirmesi unathenticated istekleri için kullanılabilecek bir API bulundu. https://www.googleapis.com/youtube/v3
Bu bana Developers console
bir cevap verir: base_url olduğunu
You can request information about information about a channel's public playlists without authentication. When you submit an unauthenticated request, you need to include the key argument that specifies the unique API key for the application making the request. For example, this request retrieves the playlists associated with the GoogleDevelopers channel.
GET {base_URL}/playlists?part=snippet
&channelId=UC_x5XG1OV2P6uZZ5FSM9Ttw
&key={YOUR_API_KEY}
. Ben Http request
yangın olduğunda Ancak, hata altına atar:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "keyInvalid",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}
burada yanlış nedir. Kimlik doğrulama olmadan geliştiriciler konsolunda neden bir yanıt alıyorum ve neden doğrudan HTTP isteği yapıldığında hata atılıyor? Çözüldü
Sorun:
I was using OAuth key instead of API key. I created server key and used this key to send HTTP request and now getting the Json response.
Sorunumu çözdüm. Düzenlenmiş cevabımı kontrol et .. –