Video Upload API (POST)

Introduction

This Cincopa API helps you fetch the upload URL to your assets library. This means you can upload a video to this URL and the video will be uploaded to your Cincopa account (available under assets page) when it can be further manipulated, distributed, shared and published as a single video, a Channel, assigned to a video portal or used as an m3u8 origin with your 3rd video player.

You can use this upload URL with an HTTP POST method. The video asset can be assigned directly to a gallery or you can upload an image and attached it to another asset to set it as a custom video poster or video thumbnail.

Creating a Cincopa API Tokken

Cincopa’s API tokens are used to secure and validate your connection to the API endpoint.

If you see in the API CALL URL mentioned in the next topic, you can see the URL contains api_token=“Your Cincopa API Token”.

You have to replace the “Your Cincopa API Token” with your API Token.

 

Next click on API Tokens

If you already have an API token you will see them here. If you want to create a new one then simply click on Create New

Next, choose a name and then select the access permissions that you want to give the API Token and then click on Create Key

The API key is now successfully created.

Video tutorial on creating a new API Token:

API KEY

Creating an Upload API call

To get the upload URL to your Cincopa account, you will have to call the following API.

API Call URL Structure

https://api.cincopa.com/v2/asset.get_upload_url.json?api_token=#Your Cincopa API Token#

Next, you can call the above-mentioned API to get the Upload URL. You can see the API call URL below.

API Call URL:

https://api.cincopa.com/v2/asset.get_upload_url.json?api_token=1411253ioelwtf5vpvx5xto5z13gzgm55sg

This API CALL contains the API token which needs to be replaced with yours. You will have to add an API token that you created in the previous step.

Once you call this URL, you will get a response with the following information:

API Call

Response Body

When you access the API call URL, the API will return a response with some data.

Success: This tells you if the API call was successful. If it returns the success as true then it means the API call was successful.

Upload URL: This returns the Upload URL for y.our Cincopa Account You can use this URL with an HTTP Post method to upload a data to your assets sections. If you can see you will find your Cincopa uid mentioned in the upload URL to upload it to your Cincopa account.

Runtime: This is the amount of time it took for the API call to send a response.

This is an example of the response you can receive:

{
    "success": true,
    "upload_url": "https://media.cincopa.com/post.jpg?uid=1411253&d=AAAAcAQtIWBAAAAAAEJqhoA&hash=x521bdtt1lmc3rau4i4qxx4rj3oqhp4b&addtofid=0",
    "runtime": 28
}

 

Import URL (external video) to Cincopa using Upload API

Please note that this method will not support videos hosted on popular consumer sites like YouTube. To migrate your YouTube channel to Cincopa please get in touch with our team.

 

The following API will allow you to upload a video using an input URL and then add it to your Cincopa account.

API Call URL:

https://api.cincopa.com/v2/asset.upload_from_url.json?api_token=1411253ioelwtf5vpvx5xto5z13gzgm55sg&input=https://www.dropbox.com/s/lrll1h7st0fwoi6/VID_20190823_172008.mp4

In the above API call URL, you can see it requires two parameters:
api_token: This is the API Token from your Cincopa Account as mentioned above.

input: This is where you will add the external video URL that you want to be uploaded to your Cincopa account. In the above example, we have added a dropbox video link.

You call this API, you will receive a similar response.

RESPONSE BODY:

{
    "success": true,
    "status_id": "c77f5690-2624-4ab3-a87b-d273aa062eef",
    "runtime": 35
}

When you access the API call URL, the API will return a response with some data.

Success: This tells you if the API call was successful. If it returns the success as true then it means the API call was successful.

status_id: This returns the status id for the upload.

Runtime: This is the amount of time it took for the API call to send a response.

Once you run the API, call you can also check your Assets section to see if the video has been uploaded.

Was this article helpful?