Navigation

Detach a device

Marks a device as 'detached' for a user. This function is automatically called if the blocking dialog is show and the user selects a device to log out. If you choose to manually perform the logout, call this function and specify the options below.

Parameters

Client ID REQUIRED

The string client ID of your project's API key.

User REQUIRED

The ID of the user this device was attached to.

Device REQUIRED

The ID of the device. This is normally returned in the response by the Attach function. If you do not know the ID of the device, you can call the Attach function again and get the device ID from the response, then use it in this function.


Returns

This function returns a UserAccessState object.


SDK Syntax

await Sabil.detach({  client_id: `client_id`,  user: `user_id`,  device: `device_id`,  debug: true, // set only if you want to debug. Not recommended for production.});