Remove all registrations for device (v2)

Bulk modification of a device, allowing for removal of all registered channels at once, for a given device, without specifying all of the channels.

Returns array with two elements:

  • Array Element 0 - Integer – 1 or 0, where 1 is success, and 0 is error.
  • Array Element 1 - String – Description of the success or error, if available. e.g "Removed Device"
Path Parameters
sub_key string REQUIRED

Your app's subscribe key from Admin Portal.

devices-apns2 string REQUIRED

ID/Token of the device.

Example: A332C23D

Query Parameters
environment string REQUIRED

Possible values: [development, production]

Environment of the mobile application.

Example: development

topic string REQUIRED

Bundle ID of the mobile application.

Example: com.my.app.Application

uuid string REQUIRED

A UTF-8 encoded string of up to 92 characters used to identify the client.

Example: myUniqueUserId

auth string

String which is either the auth key (Access Manager legacy) or a valid token (Access Manager) used to authorize the operation if access control is enabled.

Example: myAuthKey

signature string

Signature used to verify that the request was signed with the secret key associated with the subscriber key.

If Access Manager is enabled, either a valid authorization token or a signature are required.

See Access Manager documentation for details on how to compute the signature.

timestamp integer

Unix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 seconds offset from NTP.

Required if signature parameter is supplied.

Responses
200

OK

Schema OPTIONAL
undefined[]
400

Bad Request

Schema OPTIONAL
undefined
403

Not Enabled

Schema OPTIONAL
error string OPTIONAL
500

Server Error

Schema OPTIONAL
error string OPTIONAL
503

Service Unavailable

Schema OPTIONAL
error string OPTIONAL
* required
sub_key*
Type: string
Your app's subscribe key from Admin Portal.
devices-apns2*
Type: string
ID/Token of the device.
* required
environment*
Type: string
Environment of the mobile application.
topic*
Type: string
Bundle ID of the mobile application.
uuid*
Type: string
A UTF-8 encoded string of up to 92 characters used to identify the client.
auth
Type: string
String which is either the auth key (Access Manager legacy) or a valid token (Access Manager) used to authorize the operation if access control is enabled.
signature
Type: string
Signature used to verify that the request was signed with the secret key associated with the subscriber key.

If Access Manager is enabled, either a valid authorization token or a signature are required.

See Access Manager documentation for details on how to compute the signature.
timestamp
Type: integer
Unix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 seconds offset from NTP.

Required if signature parameter is supplied.
message
Type: string
Example: "Invalid Subscribe Key"
error
Type: boolean
Example: true
service
Type: string
Example: "Access Manager"
status
Type: integer
Example: 400
error
Type: string
Example: "Use of the mobile push notifications API requires Push Notifications which is not enabled for this subscribe key. Login to your PubNub Dashboard Account and enable Push Notifications. Contact support@pubnub.com if you require further assistance."
error
Type: string
Example: "Internal Server Error"
error
Type: string
Example: "Failed to retrieve account configuration"