can you please post the code for receving message on real time? I have send, amd receive message.
If you are coding in as3 flex then this is how you send IM as cookie
var getURL:String = "http://"+ notifyServer +"/v1"+ "/pushchannel"+ "/"+ primaryLoginId+
//getURL = "http://rproxy1.messenger.yahooapis.com" +"/v1"+ "/pushchannel"+ "/"+ primaryLoginId+
"?"+
"sid="+sessionId+
"&seq=0"+
"&format=json"+
"&rand=123456"+
"&idle=30"+
defaultOAuthParameters();
httpService.url = getURL;
httpService.method = "GET";
httpService.contentType = "application/json;charset=utf-8";
var urlReq:URLRequest = new URLRequest();
urlReq.method = URLRequestMethod.POST;
urlReq.requestHeaders.push(new URLRequestHeader("Cookie","IM="+requestToken));
httpService.request = urlReq;
httpService.send();
IM Value:- IM value is the requestToken you get from login procedure.
You should also not forget to send notifyServerToken in url parameters in following manner when you create session
var currentDate:Date = new Date();
var uuid:String = UIDUtil.getUID(currentDate);
var url:String = "http://developer.messenger.yahooapis.com/v1/session"+
"?" +
"c="+crumb+
"¬ifyServerToken=1"+ "&realm=yahooapis.com&"+
"oauth_consumer_key="+consumerkey+
"&oauth_nonce="+uuid+
"&oauth_signature_method=PLAINTEXT"+
"&oauth_timestamp="+new Date().getMilliseconds()/1000+
"&oauth_token="+oAuthToken+
"&oauth_version=1.0"+
"&oauth_signature="+signature+ "%26"+ oAuthTokenSecret;
var req:Object = new Object();
req.presenceState = 0;
req.presenceMessage = "I am not here right now";
var clientCapabilities:Array = new Array();
clientCapabilities.push({"clientCapability" : "smiley"});
clientCapabilities.push({"clientCapability" : "buzz"});
req.clientCapabilities = clientCapabilities;
var jsonReq:String = JSON.encode(req);
httpService.method = "POST";
httpService.contentType = "application/json;charset=utf-8";
httpService.url = url;
httpService.send(jsonReq);