This method allows you to unpair a device from a user account. It simply declares that the user account no longer owns the device. In other words, it makes the device available for other users to claim.

This method returns the following codes in response


device paired successfully and access token returned


device is not paired to the account


device is not registered with this id


device id is required

Use of unpairDevice method has been illustrated in the example below

// Submit request to the server
device.unpair().then((res) => {
  // Got the response
  switch(res.code) {
    case "DEVICE-UNPAIRED": 
      // Device got unpaired with the user account