Navigation
Retrieve user devices
List the devices for a user. Pass the user ID your application uses to identify the user to Rupt.
Parameters
user string REQUIRED
The user ID your application uses to identify this user to Rupt.
Returns
Returns an array of device objects.
GET/v3/user/:id/devices
const devices = await rupt.getUserDevices({ user: "USER_ID" });
Response
[
{
"id": "635940382397b3ac0b81c0b7",
"user": "649873be6e8b6f9b33722a0c",
"status": "attached",
"metadata": {
"key": "value"
},
"info": {
"device": {
"vendor": "Apple",
"model": "iPhone 12",
"type": "mobile"
}
},
"attached_at": "2021-09-01T00:00:00.000Z",
"actively_connected": true,
"createdAt": "2021-09-01T00:00:00.000Z",
"updatedAt": "2021-09-01T00:00:00.000Z"
}
]