Hey, so I'm pretty familiar with the youtube api. I know how to read feeds and a playlist along with getting any important video information that I identify as important. I use php to do all this, but to make sure that I have the right idea of ββhow each request / response works. I tried it in a browser using an API browser
Now I am trying to insert a video into the playlist that I just created (also through the API), but I have some problems figuring out how my request is not generated correctly
Request here
POST https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&key={YOUR_API_KEY} Content-Type: application/json Authorization: Bearer ya29.1.AADtN_WT2TRZzH1t86nVlX26z9WPp-gnDTxVHGvdQ6xx0vyTzmkYeXkLdJerwllLzF_a X-JavaScript-User-Agent: Google APIs Explorer { "snippet": { "playlistId": "PL8hD12HFC-nuswc21_e64aPAy9B25sEH7", "resourceId": { "videoId": "KMGuyGY5gvY" } } }
Here is the answer
400 Bad Request - Show headers - { "error": { "errors": [ { "domain": "youtube.playlistItem", "reason": "invalidResourceType", "message": "Resource type not supported." } ], "code": 400, "message": "Resource type not supported." } }
the playlist is an empty public playlist that I created using the API API and is viewable through the standard YouTube website. The video was accidentally selected from youtube ... I tried several, because I thought it might be a specific problem with the video, but not luck .. I turned on OAuth and use an account that is a verified YouTube partner.
However, I can understand why the resource type is not supported. I browsed the web along with the answers on the left, not finding what I was doing wrong. Any help with this problem would be greatly appreciated since I was kind of stuck at the moment
youtube youtube-api
brendosthoughts
source share