get devices
Request Description
This endpoint retrieves the list of devices associated with the authenticated user. It allows users to view their devices and whether the device appears to be online.
Response JSON Schema
On a successful request, the server responds with a status code of 200 and a JSON object containing the following structure
devices: An array of device objects, each containing:
deviceId: (string) The unique identifier for the device.
name: (string) The name of the device.
description: (string) A brief description of the device.
online: (boolean) Indicates whether the device is currently online.
releaseChannel: (string) The release channel of the device.
deviceType: (string) The type of the device.
deviceFamily: (string) The family to which the device belongs.
deviceGroup: (string) The group classification of the device.
Responses
200 ok application/json
devicesarray
[items]object
{ "devices": [ { "description": "late.smoke", "deviceFamily": "v2", "deviceGroup": "", "deviceId": "t2iumaiU2bEmyQJ4JSXZQZPh", "deviceType": "v2", "name": "Player 2", "online": false, "releaseChannel": "general" }, { "description": "square.union", "deviceFamily": "v2", "deviceGroup": "", "deviceId": "t21KFoWYO48DwzXPIo7ObZ7U", "deviceType": "v2", "name": "V2 player", "online": false, "releaseChannel": "general" } ]}
/device-v2/devices/mine
Authorization (bearerAuth)
curl "https://api.yotoplay.com/device-v2/devices/mine"--header "Authorization: Bearer [YOUR_TOKEN]"
const options = { method: 'GET', headers: { 'Authorization': 'Bearer [YOUR_TOKEN]' }};
fetch('https://api.yotoplay.com/device-v2/devices/mine', 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/device-v2/devices/mine", 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/device-v2/devices/mine"
headers = { "Authorization": "Bearer [YOUR_TOKEN]"}
response = requests.request("GET", url, headers=headers)
print(response.text)