Media

Create media upload url

Creates an Amazon S3 upload URL that can be used to transfer media to Hootsuite which ensures the media is available when a scheduled message is sent to the social network. Hootsuite will generate thumbnails and key frames and return a unique media identifier that can be passed when creating a message. Subsequent uploads to an upload URL will be accepted by Amazon but immediately deleted by Hootsuite and only the first valid media file uploaded will be used. The MIME type and size provided in this call must match the MIME type and size of the media uploaded.

After requesting an upload URL, make a PUT request to the uploadUrl returned, an example cURL request would look like the following, replace the fields as appropriate:

curl --location --request PUT 'https://hootsuite-video.s3.amazonaws.com/production/12255244_01942650-3d42-42b8-a191-aa84eb45d105.mp4?AWSAccessKeyId=AKIAIM7ASX2JTE3ZFAAA&Expires=1471978770&Signature=b%2B196oEHxySdmE%2FC34ZRL6pXSAI%3D' \
  --header 'Content-Type: video/mp4' \
  --header 'Content-Length: 383631' \
  --data 'SOURCE-MEDIA-LOCATION'

Hootsuite will remove uploaded media 90 days after using the media in a message.

post/v1/media

Request

  • Base URL
    https://platform.hootsuite.com
  • URL
    https://platform.hootsuite.com/v1/media
  • Auth
    OAuth 2
    Authorization code: https://platform.hootsuite.com/oauth2/auth
    Token URL: https://platform.hootsuite.com/oauth2/token

Headers

Authorizationstring required

A bearer token string used for authentication

Request body

sizeBytesinteger

Size in bytes of the media file to be uploaded.

mimeTypestring

MIME type of the media to be uploaded. Supported media types are video/mp4, image/gif, image/jpeg, image/jpg, image/png.

Example request

{
  "sizeBytes": 383631,
  "mimeType": "video/mp4"
}

Response

Success

Example response

{
  "data": {
    "id": "aHR0cHM6Ly9ob290c3VpdGUtdmlkZW8uczMuYW1hem9uYXdzLmNvbS9wcm9kdWN0aW9uLzEyMjU1MjQ0XzgyOTVmZjllLWFkOWYtNGNlNy1iOGE3LTgwNzI0NDAwYTBhZS5tcDQ=",
    "uploadUrl": "https://hootsuite-video.s3.amazonaws.com/production/12255244_01942650-3d42-42b8-a191-aa84eb45d105.mp4?AWSAccessKeyId=AKIAIM7ASX2JTE3ZFAAA&Expires=1471978770&Signature=b%2B196oEHxySdmE%2FC34ZRL6pXSAI%3D",
    "uploadUrlDurationSeconds": 1799
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.