Update title and description using YouTube v3 API?

后端 未结 2 483
失恋的感觉
失恋的感觉 2021-01-06 05:14

I successfully uploaded a video to YouTube using YouTube Data API v3. No third party libraries were used. Now I want to update the title and description of an uploaded video

相关标签:
2条回答
  • 2021-01-06 05:30

    Not sure why, but if I include the entire json response from the actual upload, it works. That is, to update the description I do the following:

    1. Upload video.
    2. Wait for response.
    3. Parse json response and replace description text.
    4. Update video with new json.

    Hence, updating using a stripped down json does not seem to work.

    0 讨论(0)
  • 2021-01-06 05:43

    It looks like you might be missing the "kind" value.

    curl --insecure -v -i -X PUT -H "Content-Type: application/json" -H "Authorization:  Bearer ACCESS_TOKEN_FROM_GOOGLE_HERE" -d '{"id":"YOUTUBE_VIDEO_ID_HERE","kind":"youtube#video","snippet":{"title":"My title","description":"My description","categoryId":"22"}}' "https://www.googleapis.com/youtube/v3/videos?part=snippet"
    
    0 讨论(0)
提交回复
热议问题