Upload a live photo
Upload live photo
POST https://api.complycube.com/v1/livePhotos
Uploads a new live photo. The live photo image must be either in JPG or PNG format. The size must be between 34 KB and 4 MB.
Headers
Name
Type
Description
Content-Type
string
The content-type must always be set to application/json.
Authorization
string
The API live or test key
Request Body
Name
Type
Description
clientId
string
The ID of the client associated with this live photo.
data
string
The BASE64 encoded data.
{
"id": "5eb1b5f231778a0008d1c3f6",
"clientId": "5eb1276d96be4a0008713af5",
"downloadLink": "/livePhotos/5eb1b5f231778a0008d1c3f6/download",
"contentType": "images/jpg",
"size": 44896,
"createdAt": "2020-01-01T14:06:44.756Z",
"updatedAt": "2020-01-01T14:06:44.756Z"
}{
"type": "invalid_request",
"message": "Image file size should be between 34KB and 4MB",
"param": "data"
}Example request
curl -X POST https://api.complycube.com/v1/livePhotos \
-H 'Authorization: <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"clientId":"5eb1276d96be4a0008713af5",
"data": "<BASE64_DATA_CONTENT>"
}' const { ComplyCube } = require("@complycube/api");
const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });
await complycube.livePhoto.upload("5eb1276d96be4a0008713af5", {
data: "<BASE64_CONTENT>"
});from complycube import ComplyCubeClient
cc_api = ComplyCubeClient(api_key='<YOUR API KEY>')
live_photo = cc_api.livephotos.upload('CLIENT_ID',{ data: '<BASE64_CONTENT>'})use ComplyCube\ComplyCubeClient;
$ccapi = new ComplyCubeClient('<YOUR API KEY>');
$img = $ccapi->livephotos()->upload('CLIENT_ID',['data' => '<BASE64_CONTENT>']);Last updated
Was this helpful?