PubNub Mobile Push Gateway - Device Token/Channel Lookup
PubNub does not currently provide a way to get device tokens for a given channel because this is considered unsecure. If you (whoever you is: client device, server, third party, etc.) should either know the device token or not. If you can not get the device token by some valid/legitimate means, then you should not be able to get by some other means (like by PubNub channel association).
What you can do is have the device POST
its token to your server along with a list of PubNub channels it should register to for push notifications and store them in your database and maintain that list as these device token/channel associations change.
You can always list the channels for a given device using the SDK's specific API:
Or use this REST API:
http://pubsub.pubnub.com/v1/push/sub-key/your_sub_key/devices/your_device_token?type=push_type
where push_type
is gcm
, apns
or mpns
.