Search
Mobile

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

Published 2 min readBy Programming4us Editorial Team

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