Push request message

A push request is a request that the Push Initiator sends to the PPG to distribute an included message to the supplied addresses. You can list addresses explicitly (for example, for all registered BlackBerry devices for a push application), or specify all addresses with a short form push_all. The push message cannot exceed 8 KB, and contains the XML control statement for the PPG to use to send the content.

To get the result from the PPG once the push message has reached a final status, the Push Initiator must request notification of the result, and provide a return URL. If you request a result for a particular message, the PPG sends the result as a resultnotification-message, and the Push Initiator must send a resultnotification-response.

This sample shows you how to create a push request message, and includes the boundary line for a multipart MIME message.

 --PMasdfglkjhqwert
Content-Type: application/xml
<?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" 
"http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd">
<pap>
  <push-message push-id="999999999"
                source-reference="AAAAAAAAAAAA"
                deliver-before-timestamp="2013-09-31T13:30:00Z"
                ppg-notify-requested-to="notify_url_path">
    <address address-value="PIN00001"/>
    <address address-value="PIN00002"/>
    <address address-value="PIN00003"/>
    <quality-of-service  delivery-method="confirmed"/>
  </push-message>
</pap>
--PMasdfglkjhqwert
Content-Encoding: binary
Content-Type: text/html

Text or binary content to be pushed to BlackBerry device goes here.

 --PMasdfglkjhqwert--

The PPG sends the push request response to the Push Initiator to acknowledge that the push message was accepted for processing. It's not a notification of the result of the push message.

Here's an example of a push request response.

 <?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" 
"http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd">
<pap>
  <push-response push-id="999999999"
         sender-address="https://www.pushdatadomain.com/PD_pushRequest"
         sender-name="RIM Push-Data"
         reply-time="2013-09-31T13:00:00Z">
    <response-result code="1001" desc="Accepted for Processing">
    </response-result>
  </push-message>
</pap>

Authorization headers

Each request message from a content provider starts with an authorization header that identifies the content provider. You must create the authorization with the basic access authentication procedure for messages sent by HTTPs. The basic access authentication procedure concatenates a user name, a colon, and a password and then encodes the string with the Base64 algorithm.

The Push Service uses the basic access authentication procedure, but different values for the user name and password, with the following values that are provided in the registration email that you receive from Research In Motion when you register to use the Push Service:
  • For the user name, the Push Service uses the App ID field in the registration email (application ID).
  • For the password, the Push Service uses the Pwd field in the registration email (password).

Here's an example of the authorization header for a request message.

Authorization: Basic QVxhZHRpbgpvcGWuIHNlc2FtZQ==