YosiFZ
YosiFZ

Reputation: 7900

Insert video to YouTube Playlist

I am using this methods from the YouTube api to add video to playlist:

POST /feeds/api/playlists/PLAYLIST_ID HTTP/1.1
Host: gdata.youtube.com
Content-Type: application/atom+xml
Content-Length: CONTENT_LENGTH
Authorization: Bearer ACCESS_TOKEN
GData-Version: 2
X-GData-Key: key=DEVELOPER_KEY

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
    xmlns:yt="http://gdata.youtube.com/schemas/2007">
  <id>VIDEO_ID</id>
  <yt:position>1</yt:position>
</entry>

As wrote in the API info i need to send video after video to add multiple videos to a playlist.

if i do it like this i get msg after 20 videos:

<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:quota</domain><code>too_many_recent_calls</code></error></errors>

There is any other way to insert video to a playlist?

Upvotes: 0

Views: 1499

Answers (1)

Ibrahim Ulukaya
Ibrahim Ulukaya

Reputation: 12877

Using Youtube Data API v3, you can achieve the result by playlistItems->insert.

YouTube Data API v3 is the suggested and widely supported one right now, quotas for v3 are pretty good.

Upvotes: 1

Related Questions