In this article
Link User to Device
To link a user to a device, you must be a device owner linked to a device.
Only an admin can link any user to any device.
URL
https://{{HOST}}/security/device/user?v={verison}&deviceId={deviceId}&userId={userId}
Method
POST
Required IMS Scopes
- securityapi_all
Versions Supported
- 2.0 (Default)
URL Query Parameters
| Name | Description | Example | Type |
|---|---|---|---|
| v optional |
Version of the api to use | /device?v=2.0 | number |
| deviceId required |
The ID of the device. | /device/user?deviceId=testDevice | string |
| userId required |
The ID of the user. | /device/user?userId=testUser | string |
Request Header Parameters
| Type | Value | Description |
|---|---|---|
| Authorization required |
Bearer {access_token} | IMS access token |
| Content-Type required |
application/json | Content Type |
Example
Request
curl -X POST
'https://{{HOST}}/securityapi/device/user?v=2.0&deviceId=testDevice&userId=testUser'
-H 'Authorization: Bearer {access_token}'
-H 'Content-Type: applicationjson'
Response
{
"success": true
}
Errors
| Error | Description |
|---|---|
| Error Name | Description of Error |
Response Body Parameters
| Name | Description | Schema |
|---|---|---|
| Object Name | Description | object definition |
| success | Description | object definition |