Uploading youtube video through the API with json using HTTP in a single request - youtube

I have been trying to upload a Youtube video including a JSON describing the video properties in the form data. I'm using Postman to send a multipart/form-data POST request, but I can't figure out what headers to use or how to use the boundary in the headers.
I have been searching for hours but there is no official documentation for this (specifically for Youtube) and I don't want to use resumable type request because the amount of requests i can do is limited. I have been trying to take advice from this question How do I upload a video to YouTube via an HTTP request? but to no avail...

Related

Can mp4 files be pulled from the YouTube Data API?

Does anyone know whether I could perform HTTP requests from the YT Data API, asking for an actual mp4 file of a video that has been uploaded to a specicific channel that has granted me access to do so via OAuth2? I would need the mp4 file because I want to subtitle the videos I pull from those channels.
I read the docs, but I wasn't able to find any details on this matter, unfortunately.
Unfortunately there isn't any YouTube Data API v3 Videos: download endpoint as there is the Captions: download one. I would recommend you to use yt-dlp to download your videos in an automatic manner.

How do you get the past live streams with YouTube data API

YouTube Data API has:
https://developers.google.com/youtube/v3/docs/videos#snippet.liveBroadcastContent
but this shows whether you are already live streaming or there is a scheduled live stream.
And the YouTube livestream API doesn't seem to deal with non-LIVE entries:
https://developers.google.com/youtube/v3/live/docs/
Use
https://developers.google.com/youtube/v3/docs/videos#liveStreamingDetails
works with api_key unlike the fileDetails in the old answer.
OLD:
I was lucky and spotted that the past live streams are saved with file name livestream.str.
So, using the YouTube Data API to get videos with filename livestream.str should work.
To get this filename, you need the OAuth2 authorization. If you use the API key you will get 403 error. Then use the part=fileDetails:
https://developers.google.com/youtube/v3/docs/videos/list#parameters

YouTube Data V3 API videos.insert - wrong snippet.categoryID

I am trying to upload the video using V3 YouTube API.
https://developers.google.com/youtube/v3/docs/videos/insert
I keep hitting HTTP 400 due to incorrect snippet.categoryID field. Is there any documentation on what available options on this field are?
I've got the answer on YouTube itself. When you upload a video, use web developer tools in browser to inspect categories dropdown. It will contain category ids.

YouTube API v3: language filter

How to retrieve Russian videos by specific category (YouTube API v3). For example, request that needed “videos category ‘Comedy’ on Russian language“:
https://www.googleapis.com/youtube/v3/search?part=snippet&order=date&regionCode=RU&type=video&videoCategoryId=23&lr=ru_RU&key={KEY}
I'ts not work.
I do not get a response: https://code.google.com/p/gdata-issues/issues/detail?id=4803
I've read through this part of the YouTube API v3 Documentation:
https://developers.google.com/youtube/v3/docs/videoCategories/list?hl=ru
and created this request url from the information I got there:
https://www.googleapis.com/youtube/v3/videoCategories?part=snippet&id=23&regionCode=RU&hl=ru_RU&key={KEY}
Give it a try.

Picasa picture upload with GDATA API over OAuth1.0

I have been trying to use the GDATA APIs for Picasa, with OAuth1.0
Though I am able read all the information, image upload is failing with HTTP error 400:Bad Request.
Can someone show me a working example of image upload using OAuth1.0+GDATA?

Resources