To get a list of devices that are registered with a given channel, you must use the REST API (there are no SDKs that implement this API) and you must sign the request using your PubNub secret key.
GET https://ps.pndsn.com/v1/push/sub-key/[subkey]/audit-devices?channel=[channel]&type=[apns|gcm]&uuid=[uuid]&signature=[signature]
URI Parameters
subkey
string
(required)
the subscriber key from your PubNub key set
- type
string
(required)
indicates the mobile push vendor to use; apns
or gcm (GCM/FCM)
- uuid
string
(required)
a unique alphanumeric ID for identifying the client to the PubNub Network
signature
string
(required) Example: 'v2rgQQ1eFzk8omugFV9V1_eKRUvvMv9jyC9ZL1ogdw%3D'
a signed request as explained below.
Signing a Request
Let’s imagine the demo account’s secret key is:
wMfbo9G0xVUG8yfTfYw5qIdfJkTd7A
The signature generated for this request is Base64 encoded using the "URL safe" characters -
and _
replacing +
and /
respectively:
v2rgQQ1eFzk8omugFV9V1_eKRUvvMv9jyC9Z-L1ogdw=
This signature is then percent-encoded according to standard query parameter percent-encoding practices. E.g. the =
character is transformed into %3D
.
v2rgQQ1eFzk8omugFV9V1_eKRUvvMv9jyC9Z-L1ogdw%3D