MOBILE

BlackBerry Development : Pushing Data to External Users - Web Signals (part 6) - Building a Web Signal - Unsubscribing from a Subscription

9/21/2013 3:39:00 AM
5. Unsubscribing from a Subscription

There are two ways a subscriber can unsubscribe from a Web Signal. The subscription service can provide them with a link on a website that allows them to unsubscribe, or the service can provide them with a link to the RIM’s Web Signals site to see a list of all of their subscriptions and they can unsubscribe from there.

To give subscribers access to a link that allows them to see all of the Web Signals they’re subscribed to, use the following URL:

http://[push-domain]/mss/PM_sublist

As an example, for a North American subscriber, you would use

http://push.na.blackberry.com/mss/PM_subList

Because RIM uses information provided by the device browser to identify the mobile user, the URL must be accessed from the user’s BlackBerry device. Figure 8 shows the subscriptions list for the particular device.

Figure 8. Web Signals subscription list page


Note

The subscriber list URL is case sensitive. It must be entered exactly as shown to view the list of Web Signals to which the device is subscribed.


To unsubscribe a subscriber from a Web Signal, the push application must provide subscribers with the means to request to be removed from the subscriber list. After the push application receives the notification from the subscriber, it would submit the POST request to the RIM Push Infrastructure with the following URL:

https://[push-domain]/mss/PM_puidDereg?sid=[SID]&
pass=[SID-Password]&puids=[PUID-List]

More than one subscriber can be unsubscribed at a time, so it might be best to accept unsubscription requests from subscribers then submit the list to RIM in a batch periodically via the Deregistration request. Table 11 provides a description for each of the parameters for the unsubscribe URL.

Table 11. Web Signals Deregistration Request URL Parameters
ParameterDescription
Push-DomainThe regional domain that the push recipient resides in. Refer to Table 3 for the possible values for this parameter.
SIDThe Service ID (SID) assigned to this Web Signal by RIM.
SID PasswordThe password associated with the SID.
PUID-ListComma-separated list of subscriber PUIDs to which the content is delivered. The push application can unsubscribe all users by using ALL_USERS for this parameter.

For a North American subscriber to the mywebsignal Web Signal, the unsubscribe URL would be

https://push.na.blackberry.com/mss/PMpuidDereg
?sid=mywebsignal&pass=mypassword
&puids=someuser@somecompany.com

To unsubscribe a batch of subscribers, include each subscriber in a comma-separated list:

https://push.na.blackberry.com/mss/PM_puidDereg
?sid=mywebsignal&pass=mypassword
&puids=someuser@somecompany.com,
anotheruser@abc.com,yetanotheruser@def.com

All subscribers can be unsubscribed using the following URL:

https://push.na.blackberry.com/mss/PM_puidDereg
?sid=mywebsignal&pass=mypassword
&puids=ALL_USERS

It is hard to think of a reason why a subscription service would want to unsubscribe all users unless the service were being shut down or was in beta mode and wanted to start over, but the capability is there.

If the RIM push infrastructure is able to successfully process an unsubscription request, the server responds with a JobID—an ID that uniquely identified the request. The job ID identifies the push request for debugging purposes or if the content provider needs to open an investigation with RIM. If the request is unsuccessful, the system returns rc=some-value, where some-value is one of the response codes listed in Table 12.

Table 12. Web Signals Deregistration Request Response Codes
Response CodeDescription
0400A SID was not provided in the request.
0401A SID Password was not provided in the request.
0402The request does not contain at least one PUID.
0403Authentication failed.
0404The specified SID does not have any subscribers, so there is nobody to unsubscribe.
0405The SID has expired or is not active.
1000The system is currently unavailable.
Other  
 
Top 10
Review : Sigma 24mm f/1.4 DG HSM Art
Review : Canon EF11-24mm f/4L USM
Review : Creative Sound Blaster Roar 2
Review : Philips Fidelio M2L
Review : Alienware 17 - Dell's Alienware laptops
Review Smartwatch : Wellograph
Review : Xiaomi Redmi 2
Extending LINQ to Objects : Writing a Single Element Operator (part 2) - Building the RandomElement Operator
Extending LINQ to Objects : Writing a Single Element Operator (part 1) - Building Our Own Last Operator
3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
REVIEW
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
VIDEO TUTORIAL
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
Popular Tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8