device.unapir

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-UNPAIRED

device paired successfully and access token returned

DEVICE-NOT-PAIRED

device is not paired to the account

DEVICE-ID-INVALID

device is not registered with this id

DATA-INVALID

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
  }
})