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

How to upload a video to YouTube using the API?

$
0
0

I am trying to use POST request to publish a video on YouTube using this official tutorial Videos: insert

Request URL:

https://youtube.googleapis.com/youtube/v3/videos?part=snippet%2Cstatus&access_token=[[I_FILE_ACCES_TOKEN]]&key=[[E_FILE_AKKOV_API_KEY]]

body of POST request:

{"snippet": {"categoryId": "22","description": "Description of uploaded video.","title": "Test video upload.","tags": ["музыка, song, classic"    ],"defaultLanguage": "ru","thumbnails": {"default": {"url": "url of jpg image"      }    }  },"status": {"privacyStatus": "private","license": "youtube"  }}

Question:"Where in the spippet is the path to the mp4 file of the disk that needs to be uploaded to YouTube?"

Naturally, it gives an error because there is a problem with the arguments in the snippet:

Url: https://youtube.googleapis.com/youtube/v3/videos?part=snippet%2Cstatus&access_token=ya29.adpsecret65&key=AIzaSyAo1secretZM_auUStatus: 400Vary: X-OriginVary: RefererContent-Type: application/json; charset=UTF-8Date: Thu, 01 Sep 2022 17:52:06 GMTServer: scaffolding on HTTPServer2Cache-Control: privateX-XSS-Protection: 0X-Frame-Options: SAMEORIGINX-Content-Type-Options: nosniffAccept-Ranges: noneVary: Origin,Accept-EncodingTransfer-Encoding: chunkedAlt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"{"error": {"code": 400,"message": "Request contains an invalid argument.","errors": [      {"message": "Request contains an invalid argument.","domain": "global","reason": "badRequest"      }    ],"status": "INVALID_ARGUMENT"  }}

Viewing all articles
Browse latest Browse all 3831

Trending Articles



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