Submitting a PAP push request

The following sample shows a push request that is sent to the PPG. This request is a multipart message that includes a PAP push message control entity and the pushed data.

Content-Type: application/xml

<?xml version="1.0"?>

  <push-message push- id="999999999"
    <address address-value="PIN00001"/>
    <address address-value="PIN00001"/>
    <quality-of-service delivery-method="confirmed"/>

Content-Encoding: binary
Content-Type: text/html

// Text or binary content to be delivered to BlackBerry device goes here.


Using any of the programming languages that you are familiar with, you can submit an HTTP POST with the URL that you created. The following code sample illustrates how you can submit the push request in JavaScript:

var url = https://cp<CPID>.<HOST>/<PATH> <Authorization_Header><PAP_Message>
var xmlhttp = new XMLHttpRequest();‘POST’,url, true);

After you submit the POST request to the PPG, it sends a push request response in PAP format. You should parse the message programmatically and look for the response-result-code to ensure that the PPG accepted your push request.

Last modified: 2015-06-11

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus