Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Regular Contributor
Posts: 84
Registered: ‎12-02-2009
My Device: Not Specified

Re: Push API sample code needed

 Is it poosibe register client app without suing content url?

New Developer
Posts: 120
Registered: ‎05-20-2011
My Device: Touch 9800
My Carrier: Vodafone

Re: Push API sample code needed



For client side i used the code from http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Simplified-BIS-Push-client-sample... . The client gets successfuly registered .


For server side i used the php curl script. I tried everything but nothings works.I am lacking to show the push message on device.Kindly provide me the suitable solution for it.

Posts: 40
Registered: ‎06-25-2012
My Device: BlackBerry Curver 9300
My Carrier: Etisalat

Re: Push API sample code needed

I tried the code you provided and it failed to send a message for me. The catch block throws the following:


Push failed! System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()


Please guide! Any help will be much appreciated. I am struggling with this for quite some time now.

Posts: 14
Registered: ‎12-09-2013
My Device: blackberry torch
My Carrier: vodafone

Re: Push API sample code needed

Hello gmurciam,

I used your java code to send push notification to BB.

I made just one change - the URL that I used was "https://cpxxxx.pushapi.eval.blackberry.com/mss/PD_pushRequest/"

I get the below response:


200 | OK


<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Pushdata Service</title>
<body bgcolor="white" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<form enctype="application/x-www-form-urlencoded" method="get">

<!-- Header -->

<!-- static error header library -->

<br clear="none"/>

<!-- Errorcode -->

<!-- dynamic @[errorcode] token -->

<font color="#777777" size="1" style="verdana">Error </font>
<br clear="none"/>
<br clear="none"/>

<!-- Errorbody -->

<!-- dynamic @[errorbody] token -->

<font color="#777777" size="1" style="verdana">The content you have requested is not available</font>
<br clear="none"/>

<!-- Error message -->

<!-- dynamic @[errormsg] token -->

<br clear="none"/>
<font color="#777777" size="1" style="verdana">fetch command is not currently in service!</font>
<br clear="none"/>
<br clear="none"/>

<!-- Footer -->

<!-- static error footer library -->

<br clear="none"/>


Could you please help in here?



Posts: 12
Registered: ‎03-29-2011
My Device: None
My Carrier: None

Re: Push API sample code needed



   I tried using your code above, replacing the ApplicationID, Push Password, and PushURL  from the email from Blackberry, and I got the following error:


Invalid document endOur PUSH-ID: 1396888666.5391<br \>
 <p>An error has occured</p>
 Error CODE: <br \>
 Error DESC: <br \>



(I also changed the _POST to _GET) 


  Any idea how to debug this?






Posts: 40
Registered: ‎06-25-2012
My Device: BlackBerry Curver 9300
My Carrier: Etisalat

Re: Push API sample code needed

Are you looking for server side code? If yes, I have a working code copy (server-side) in c# here:




Hope this helps!

New Contributor
Posts: 2
Registered: ‎07-30-2015
My Device: android
My Carrier: speedy

Re: Push API sample code needed

i got error message
Response CODE: 1001
Response DESC: The request has been accepted for processing.
what wrong with the BB sending message rule....
thanks for answer.....