Push API \ Upload a video to YouTube

Resource/URI @Facebook GET POST PUT DELETE
Publish Post On Facebook /push/identities/<identity_token>/facebook/post.json Publish
Post
Upload Picture To Facebook /push/identities/<identity_token>/facebook/picture.json Upload
Picture
Upload Video To Facebook /push/identities/<identity_token>/facebook/video.json Upload
Video
Resource/URI @LinkedIn GET POST PUT DELETE
Publish On a LinkedIn User Profile /push/identities/<identity_token>/linkedin/post.json Publish
User
Publish On a LinkedIn Company Page /push/identities/<identity_token>/linkedin/company/post.json Publish
Company
Resource/URI @Twitter GET POST PUT DELETE
Publish Tweet On Twitter /push/identities/<identity_token>/twitter/post.json Publish
Tweet
Upload Picture To Twitter /push/identities/<identity_token>/twitter/picture.json Upload
Picture
Upload Video To Twitter /push/identities/<identity_token>/twitter/video.json Upload
Video
Resource/URI @Pinterest GET POST PUT DELETE
Publish Pin To Pinterest /push/identities/<identity_token>/pinterest/pin.json Publish
Pin
Resource/URI @YouTube GET POST PUT DELETE
Publish Video To YouTube /push/identities/<identity_token>/youtube/video.json Publish
Video

Workflow

Request: the code to send to the API

Send a POST request with the data below to the endpoint /push/identities/<identity_token>/youtube/video.json to post a new video on behalf of a YouTube user. The <identity_token> is obtained whenever one of your users connects using a social network account.

In opposition to other API endpoints, the request is processed asynchronously. The video will be added to a queue, downloaded by our system and then uploaded to YouTube. The upload duration depends on the video size.

If you specify a callack_url, the result will be send to that URL once the request has been processed.

To be able to use this endpoint, YouTube must be fully configured for your OneAll Site. The permission Upload Videos has to be enabled and the user must have given consent to publish content on his behalf when he logged in with YouTube.

POST data to include in the request

    {
      "request": {
        "push": {
          "video": {
            "video_url": "#video_url#",
            "title": "#title#",
            "description": "#description#",            
            "thumbnail_url": "#thumbnail_url#",
            "callback_url": "#callback_url#"
          }
        }
      }
    }
Key Description
*#video_url# The fully qualified URL of the video to upload. The video must have one of the following formats: 3gpp, avi, flv, mov, mpeg4, mpegps, webm, wmv.
Example: https://your-website.com/birthday-party.avi
*#title# The title of the video to share.
Example: Birthday Party
#description# The description of the video being shared.
Example: Some highlights of my birthday party
#thumbnail_url# A fully qualified URL to a picture to use as thumbnail of the video.
This feature is might be disabled depending on your YouTube account.
Example: https://your-website.com/birthday-party.png
#callback_url# The fully qualified URL to the script to notify once the video has will be uploaded.
A POST request including the video details will be send to that url.
Example: https://your-website.com/upload-video-callback.php

Result: the code returned by the API

Resultset Example

{
  "response": {
    "request": {
      "date": "Fri, 25 Jan 2018 12:00:53  0200",
      "resource": "/push/identities/12345678-ABCD-WXYZ-1234-ABCABCABCABC/youtube/video.json",
      "status": {
        "flag": "success",
        "code": 200,
        "info": "Your request has been processed successfully"
      }
    },
    "result": {
      "data": {
          "provider": "youtube",
          "object": "video",
          "video_id": "123456789012345678",
          "video_location": "https://www.youtube.com/video/123456789012345678/",
          "video_description": "My note",
          "video_link": "https://www.youtube.com/r/video/123456789/987654321/123456789abcdef"
      }
    }
  }
}
	

User Contributed Notes