MOBILE

BlackBerry Development : Pushing Data to External Users - Web Signals (part 5) - Building a Web Signal - Requesting the Status of a Subscription

9/21/2013 3:37:45 AM
3.4 Requesting the Status of a Subscription

A Web Signal can check the subscription status for subscribers by using the following URL:

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

Table 8 provides a description for each of the status URL parameters.

Table 8. Web Signals Push Status Request Parameters
Push 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 query the status for all subscribers for the SID by using ‘ALL_USERS’ for this parameter.

If the request is successful, the server returns a comma-separated list of status values in the following format:

puid1=[status],puid2=[status],puid3=[status]

The possible [status] values are defined in Table 9.

Table 9. Web Signals Push Status Request Status Values
StatusDescription
AThe user is subscribed to the Web Signal.
CThe user has been unsubscribed from the Web Signal by the content provider.
SThe user has unsubscribed from the Web Signal.
IThe PUID is invalid or does not exist.

If the system is unable to process the request, the server returns rc=some-value, where some-value is one of the response codes described in Table 10.

Table 10. Web Signals Status Request Response Codes
Response CodeDescription
0300A SID has not been provided.
0301A SID password has not been provided.
0302The request does not contain at least one PUID.
0303Authentication failed.
0304The specified SID does not have any subscribers.
0305The SID has expired or is not active.
1000The system is currently unavailable.

To check the status of a single North American PUID, the push application would use the following URL:

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

A successful response from the server would look like the following, indicating that the user is an active (a) subscriber:

puid1=a

If the push application does not use email address for the PUID, but some internal ID (such as PR0192JHSKJ), the URL would look like this:

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

To check the status of multiple push subscribers, the push application would use the following URL:

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

A successful response from the server would look like the following, indicating that puid1 and puid2 are currently subscribed, but puid3 has been unsubscribed:

puid1=a,puid2=a,puid3=s

To check the status of all push subscribers, the push application would use the following URL:

https://push.na.blackberry.com/mss/PM_siduersStatus?
sid=mywebsignal&pass=mypassword&puids=ALL_USERS
Other  
 
Top 10
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
3 Tips for Maintaining Your Cell Phone Battery (part 1) - Charge Smart
OPEL MERIVA : Making a grand entrance
FORD MONDEO 2.0 ECOBOOST : Modern Mondeo
BMW 650i COUPE : Sexy retooling of BMW's 6-series
BMW 120d; M135i - Finely tuned
PHP Tutorials : Storing Images in MySQL with PHP (part 2) - Creating the HTML, Inserting the Image into MySQL
PHP Tutorials : Storing Images in MySQL with PHP (part 1) - Why store binary files in MySQL using PHP?
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 BlackBerry Android Ipad Iphone iOS