Upload Media /v2/media

Upload Media

Endpoint

Base URL: https://backend.blotato.com/v2

URL: /media

Method: POST

Description

This endpoint allows users to upload media by providing a URL. The uploaded media will be processed and stored, returning a new media URL that is used to publish a new post. Most of the platforms require validated URLs for posting images

Request

Request Body

Field

Type

Required

Description

url

string

āœ…

The URL of the media to upload.

Responses

Success Response

Status Code: 201 Created

Response Body:

{
  "url": "https://database.blotato.com/path-to-uploaded-media.jpg"
}

Error Responses

Internal Server Error

Status Code: 500 Internal Server Error

{
  "code": 9999,
  "message": "An unknown error occurred."
}

Too Many Requests

Media upload has a user-level rate limit of 10 requests / minute.

Status Code: 429 Too many requests

{
  "statusCode": 429,
  "message": "Rate limit exceeded, retry in 49 seconds"
}

Error Codes

The following client error codes may be returned:

Code

Description

9999

Unknown error.

Examples

1. Upload Media

POST https://backend.blotato.com/v2/media HTTP/1.1
Content-Type: application/json

{
  "url": "https://example.com/image.jpg"
}

Response:

{
  "url": "https://database.blotato.com/d1655c49-0bc4-4dd0-88b2-323ce0069fa4.jpg"
}

Upload Google Drive

If you have a link in google drive like this: ā€‹ ā€‹https://drive.google.com/file/d/18-UgDEaKG7YR7AewIDd_Qi4QCLCX5Kop/view?usp=drivesdk ā€‹ You can use the following link for your Blotato "upload media" API call: ā€‹ ā€‹https://drive.google.com/uc?export=download&id=18-UgDEaKG7YR7AewIDd_Qi4QCLCX5Kop ā€‹ Note how the IDs match: 18-UgDEaKG7YR7AewIDd_Qi4QCLCX5Kop

Last updated