upload cover image
This endpoint enables uploading a cover image to a user's media account.
It supports both direct file uploads and URL-based image fetching, with automatic image conversion.
Responses
200 OK (Binary image upload) / 200 OK (Image URL upload) application/json
coverImageobject
mediaIdstring
mediaUrlstring
{ "coverImage": { "mediaId": "uiM3MMWgQkG_zdd_EYHd93Z2OQSH5Hn069wDGdWANMc", "mediaUrl": "https://card-content.aws.fooropa.com/1bErAD2CBDPwN88jdjBO7aVSR1OGL5DOq05fyz6PioCs~/pub/uiM3MMWgQkG_zdd_EYHd93Z2OQSH5Hn069wDGdWANMc" }}
400 Bad Request (Missing image file body or imageUrl param) application/json
errorobject
codestring
messagestring
{ "error": { "code": "bad-request", "message": "A binary image file body or imageUrl param is required" }}
403 Forbidden (Access to media account denied) application/json
errorobject
codestring
messagestring
{ "error": { "code": "forbidden", "message": "Access to media account denied" }}
Query Parameters
imageUrl string
URL of an image to fetch and upload. Required if no file body is provided.
Example
https://picsum.photos/id/237/200/300.jpg
autoconvert string
Whether to automatically convert the image to the specified cover type. Boolean,
Example
true
coverType string
The type of cover image to create. This determines the image dimensions.
Example
default
filename string
Custom filename for the uploaded image.
Example
POST
/media/coverImage/user/me/upload
Server URL: https://api.yotoplay.com
Authorization (bearerAuth)
Query Parameters
KEY | VALUE |
---|---|
Request Body
curl "https://api.yotoplay.com/media/coverImage/user/me/upload"--header "Authorization: Bearer [YOUR_TOKEN]"
const options = { method: 'POST', headers: { 'Authorization': 'Bearer [YOUR_TOKEN]' }};
fetch('https://api.yotoplay.com/media/coverImage/user/me/upload', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://api.yotoplay.com/media/coverImage/user/me/upload", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Authorization: Bearer [YOUR_TOKEN]" ],]);
$response = curl_exec($curl);$err = curl_error($curl);
curl_close($curl);
if ($err) { echo "cURL Error #:" . $err;} else { echo $response;}
import requests
url = "https://api.yotoplay.com/media/coverImage/user/me/upload"
headers = { "Authorization": "Bearer [YOUR_TOKEN]"}
response = requests.request("POST", url, headers=headers)
print(response.text)