Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Reply
Contributor
Posts: 42
Registered: ‎09-25-2010
My Device: Not Specified

Remote (server side) register/deregister from Push Service

Hi, using BPSS, how can we handle register or deregistering some user from the push service?

 

I will need especially to deregister user due to user authentication logic

 

thanks in advance.. Smiley Happy

Contributor
Posts: 42
Registered: ‎09-25-2010
My Device: Not Specified

Re: Remote (server side) register/deregister from Push Service

No answer.. Smiley SadIs there no API to do the register/deregister from the server side?? like we see in debug portal ??

Developer
Posts: 235
Registered: ‎11-08-2010
My Device: Not Specified

Re: Remote (server side) register/deregister from Push Service

Registration can only occur via the device to Push Service. Degistration can happen from device OR you can use an HTTP interface server-to-server to deregister.

Contributor
Posts: 42
Registered: ‎09-25-2010
My Device: Not Specified

Re: Remote (server side) register/deregister from Push Service

hi massimo, thanks for the reply,

 

ok, deregister is enough for me, so which HTTP interface server-to-server is used to deregister?? can you enlighten me ?? thank you..

Developer
Posts: 235
Registered: ‎11-08-2010
My Device: Not Specified

Re: Remote (server side) register/deregister from Push Service

I grabbed it out of PushSDK.properties:

 

For the EVAL environment it is:

https://pushapi.eval.blackberry.com/mss/PD_cpDeregUser?pin=

 

You must set the Basic Auth header as well.

 

Contributor
Posts: 42
Registered: ‎09-25-2010
My Device: Not Specified

Re: Remote (server side) register/deregister from Push Service

thanks massimo, i will try that.. Smiley Happy
Developer
Posts: 1,657
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Remote (server side) register/deregister from Push Service

just found the solution HowTo

 

  • deregister users from server side
  • suspend users from server side
  • resume users from server side

 

using low-level API

 

httpResponse = client.transmitGET(
					pushProperties.getSubscriptionResumeUrl()+"<your-pin>", 
	"", // no contentType needed 
	PUSH_APP_ID, //username your secret app-id
	PUSH_APP_PW, // password 
	null); // no headers needed

...
// same to suspend
pushProperties.getSubscriptionSuspendUrl()
...
// and to deregister
pushProperties.getSubscriptionDeregistrationUrl()
...
// some useful response returncodes:
// rc-200 successfull 
// rc-10007 PIN not found 
// rc-10012 PIN already suspended

BTW: 'client' is HttpClientImpl Class from pushsdk.commons

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner