Skip to content

Cancel Device Registration

To cancel the registration of a device with Backendless, an application can use the API described below:


function unregisterDevice(): Promise<Object>;

Return value

Returns an object containing the result property:

  "result" : "true" | "false",  


Argument                Description
result When the operation is successful and the device registration is canceled, the operation returns true in this property. Otherwise, returns false.


The following errors may occur during the device registration cancellation API callThe following errors may occur during the device registration API call. See the Error Handling section for details on how to retrieve the error code when the server returns an error:

Error Code
Unable to cancel device registration - unknown device ID.



Codeless Reference


Returns the integer value identifying the number of channels which the device is still registered with in Backendless. This information is helpful to determine if the device should also be unregistered from FCM. When the number of remaining registrations in Backendless is zero, in some cases it might be needed to unregister from FCM as well.

The example below cancels the registration of a device with Backendless: