The aim is to create a Watch Later button using the YouTube API. When a user clicks the button, the video is saved into the user\'s Watch Later playlist. Simila
Retrieving "Watch Later" playlist:
As pointed out by others, YouTube no longer allow this
Adding a video to that same list is rather straight forward though:
curl --request POST \
'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"snippet":{"playlistId":"WL","position":0,"resourceId":{"kind":"youtube#video","videoId":"M7FIvfx5J10"}}}' \
--compressed
You can find Javascript code snippet and more here: https://developers.google.com/youtube/v3/docs/playlistItems/insert