Media

Get media file metadata

The response returns metadata of uploaded media.

Get media file metadata

get

Response returns metadata of uploaded media

Authorizations
Path parameters
fileIdstringRequired

ID of the file that was returned in media upload request

Responses
200

Success

application/json
get
/v1/media/{fileId}
GET /v1/media/{fileId} HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "expirationTime": 1583845974,
  "broadcastAllowed": true
}

Media download

  • The media file is available for download for 30 days.

  • The response body contains:

    • The binary media data if not client-side encrypted.

    • The encrypted binary media data if client-side encrypted.

  • The download URL is specified in the moMedia event in the downloadURL parameter of the files object array.

Media Download

get
  • Media file will be available for download for 30 days

  • The response body will contain:

    • the binary media data if it is not client side encrypted

    • the encrypted binary media data if client side encrypted

  • The download URL is specified in the moMedia event in the downloadUrl parameter of the files object array

Authorizations
Query parameters
fileIdstringRequired

ID of the file that is presented in MO Callbacks

sourcestring · enumOptional

If encryption is client, value should be 'client'

Possible values:
sha256HashstringRequired

Hash of file that is presented in MO Callbacks

Responses
200

Success

*/*
Responsestring · binary
get
/v1/media
GET /v1/media?fileId=text&sha256Hash=text HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Accept: */*
TUYASDBJHWETTASDGJ

Upload media file for One API

  • The uploaded media file is available for message sending for 30 days after uploading.

  • The body must contain the binary media data.

  • The media size limit is 30MB.

Upload media file for One Api

post
  • Uploaded media file will be available for message sending for 30 days after uploading

  • The body must contain the binary media data

  • Media size limit is 30MB

Supported content types and limitations

Authorizations
Query parameters
tostringOptional

Field that marks this upload file for delivery to a single destination user. Limits message sending to only this number

broadcastAllowedbooleanOptional
fileNamestringRequired

File name of the file being uploaded

encryptionKeystringOptional
kmsArnstringOptional
encryptionCipherstringOptional
sha256FileHashstringOptional
Header parameters
Content-TypestringRequired

Content type of file

Example: image/jpg
Body
objectOptional
Responses
201

Success

application/json
post
/v1/media
POST /v1/media?fileName=text HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 188

"curl -X POST -H \"Authorization: YOUR-API-KEY\" -H 'Content-Type: image/jpg' --data-binary @myFilename.jpg https://platform.clickatell.com/v1/media?fileName=myFilename.jpg&to=27999123456"
{
  "fileId": "uuid.xxx",
  "accepted": true,
  "error": null
}

Last updated