get public icons
This endpoint retrieves the list of public icons that are available to every user.
Response
The response is a JSON object with the following schema:
{
"displayIcons": [
{
"mediaId": "mlWc6s-JGfZc"
"userId": "yoto",
"createdAt": "2024-11-18T17:21:28.761Z",
"new": true,
"publicTags": [
"handbag"
],
"title": "Handbag",
"url": "https://media-secure.aws.com/icons/mlWc6s-JG"
"public": true,
"displayIconId": "673b779814f1f54038881d6f"
}
]
}
The displayIcons
array contains objects with the following properties:
mediaId
(string): A unique identifier for the underlying icon fileuserId
(string): The ID of the user who uploaded this icon. The value will always beyoto
createdAt
(string, ISO 8601) - UTC timestamp when this icon record was creatednew
(boolean): always true for public iconspublicTags
(array of strings): Public tags associated with the display icontitle
(string): The title of the display iconurl
(string): The URL of the display iconpublic
(boolean): Indicates if the display icon is public. Always true for yoto iconsdisplayIconId
(string): Unique identifier for the icon
Responses
/media/displayIcons/user/yoto
Authorization
Samples
curl "https://api.yotoplay.com/media/displayIcons/user/yoto" --header "Authorization: Bearer [YOUR_TOKEN]"
const options = { method: 'GET', headers: { 'Authorization': 'Bearer [YOUR_TOKEN]' } }; fetch('https://api.yotoplay.com/media/displayIcons/user/yoto', 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/displayIcons/user/yoto",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/displayIcons/user/yoto" headers = { 'Authorization: Bearer [YOUR_TOKEN]' } response = requests.request("GET", url, headers=headers) print(response.text)