Sign In Register

How can we help you today?

Start a new topic

LogEventRequest in Real Time

Hi,


I have an issue if I use RTSession.newRequest().createLogEventRequest(). 


I have the "NOTAUTHORIZED" error message. I'm supposed to create an account and use it to be able to call an event with the realtime system or there is another way to do this ?

 

 Régis


I reply myself. You have to set a player id like this :


var request = RTSession.newRequest().createLogEventRequest();
request.setEventKey(...);
//Important in RT scripts to manually set the playerId of the request before sending it
//If you don't do this your request will most likely fail with "NOTAUTHORIZED"
request.setPlayerId(...);
request.send(function(response){
    var scriptData = response.scriptData; 
});

the problm is not your script. the Not Authorized message is because you need an authentication request before being allowed to make your logeventrequest


Thank you for your help. In fact the key is just to set the player Id with :


 request.setPlayerId(...);

oh! good to know then

Login to post a comment