Push API \ Upload a video to Twitter

Resource/URI GET POST PUT DELETE
Facebook · Publish a post on a user's profile /push/identities/<identity_token>/facebook/post.json Publish
User Post
Facebook · Upload a picture on behalf of a user /push/identities/<identity_token>/facebook/picture.json Upload
User Picture
Facebook · Upload a video on behalf of a user /push/identities/<identity_token>/facebook/video.json Upload
User Video
Facebook · Publish a post on a page the user administers /push/identities/<identity_token>/facebook/page/post.json Publish
Page Post
Facebook · Publish a video on a page the user administers /push/identities/<identity_token>/facebook/page/video.json Upload
Page Video
LinkedIn · Publish a post on a user's profile /push/identities/<identity_token>/linkedin/post.json Publish
User Post
LinkedIn · Publish a post on a company page the user administers /push/identities/<identity_token>/linkedin/company/post.json Publish
Company Post
Twitter · Publish a tweet on a user's timeline /push/identities/<identity_token>/twitter/post.json Publish
Tweet
Twitter · Upload a picture on behalf of a user /push/identities/<identity_token>/twitter/picture.json Upload
Picture
Twitter · Upload a video on behalf of a user /push/identities/<identity_token>/twitter/video.json Upload
Video
Pinterest · Publish a pin on behalf of a user /push/identities/<identity_token>/pinterest/pin.json Publish
Pin
YouTube · Publish a video on behalf of a user /push/identities/<identity_token>/youtube/video.json Upload
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>/twitter/video.json to upload a new video on behalf of a Twitter user. The <identity_token> is obtained whenever one of your users connects using a social network account.

To be able to use this endpoint Twitter must be fully configured for your OneAll Site and the setting Permissions \ Access permission of your Twitter app must be set to Read and Write.

Video uploads are processed asynchronously.

Sending a request to this endpoint will add the url of the video to a queue. Our system will then download the video from the specified URL and upload it back to Twitter. Once the upload is finished, the result will be posted to the specified callback_url.

Uploading a video will not create a tweet.

Uploading a video will not create a tweet but generate a video_id that you can use to attach the video to a tweet. New tweets can be published with our PUSH API.

POST data to include in the request

    {
      "request": {
        "push": {
          "video": {
            "video_url": "#video_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
#callback_url# The fully qualified URL to the script to notify once the video 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": "Tue, 15 May 2018 11:19:14 +0200",
				"resource": "/push/identities/77f3919e-77f3-418d-5eb9-418dea325eb9/twitter/video.json",
				"status": {
					"flag": "success",
					"code": 200,
					"info": "Your request has been processed successfully"
				}
			},
			"result": {
				"data": {
					"object": "video",
					"result": "The video has been added to the queue and will be uploaded soon."
				}
			}
		}
	}
	

Result: the code posted to the specified callback url

Resultset Example

{
  "response": {
    "request": {
      "date": "Tue, 23 Apr 2019 09:38:03 +0200",
      "resource": "push/identities/6f8d0d26-caa6-42d2-b772-3091d8449927/twitter/video.json",
      "status": {
        "flag": "success",
        "code": 200,
        "info": "Your request has been processed successfully"
      }
    },
    "result": {
      "data": {
        "provider": "twitter",
        "object": "video",
        "video_id": "1120592651986796544",
        "date_creation": "Tue, 23 Apr 2019 09:36:28 +0200"
      }
    }
  }
}
    

User Contributed Notes