Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Unable to set thumbnail using curl

$
0
0

How do I set a Youtube video's thumbnail using their API and curl (or Postman)?

From Postman, I have the following curl command:

curl --location --request POST 'https://youtube.googleapis.com/upload/youtube/v3/thumbnails/set?videoId=<VIDEO_ID>' \--header 'Authorization: Bearer <ACCESS_TOKEN>' \--header 'Content-Type: image/jpeg' \--data-binary '@/Path/to/file/under2MB.jpeg'

...but I keep getting a mediaBodyRequired error.

Per the docs (https://developers.google.com/youtube/v3/docs/thumbnails/set) I thought I should try, --header 'Accept: application/json' --compressed

...but now I keep getting error reasons of "forbidden" and "authRequired"

I tried the verbose flag, and it appears that:

  • We are completely uploaded and fine

but then I am told:

< HTTP/2 403

Note, I've also tried adding the query parameter &uploadType=media per this SO post, but now I am just getting "caller does not have permission" error, even though with the exact same credentials I can modify the title of a video... :\

Lastly, the Youtube account does have intermediate feature eligibility (videos over 15 min, custom thumbnails, etc.)

Any suggestions on how to get this to work? Thanks :)


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>