I am trying to upload a video to youtube via data api, but cannot figure out where to put the url where the file is located?
Is there any possibility without a library just via https request?
I can find this in the docs:
{"snippet": {"title": "Summer vacation in California","description": "Had fun surfing in Santa Cruz","tags": ["surfing", "Santa Cruz"],"categoryId": "22" },but no file or path url here. It says:
Call the script
The list below defines the script's command-line arguments:
file: This argument identifies the location of the video file that you are uploading.
Example: --file="/home/path/to/file.mov"But I would like to implement it as mentioned without libraries.
I was also able to figure out the following mentioned in the docs:
This method supports media upload. Uploaded files must conform to these constraints:
Maximum file size: 256GBAccepted Media MIME types: video/*, application/octet-streamMaybe someone has an example request how to do it, like this example to upload a FACEBOOK video:
POST https://graph.facebook.com/v15.0/[page-id]/videoswith the following parameters:
file_url = XY,description = XZ,access_token = EAMaybe there is an easy solution like this example for youtube as well.
Thanks!
Reading the official docs.