Sign In Register

How can we help you today?

Start a new topic

Retrieve error values from AuthenticationResponse in AS3

Is there a way to retrieve error values (UNRECOGNISED, LOCKED) from AuthenticationResponse?

Now I am using response.HasErrors(), but it doesn't give me the values.

AuthenticationResponse WebSocketMessage:



P.S. Second day exploring GS platform. As far as I learnt, GameSparks looks awesome.

Best Answer

Found it:

if ( response.getAttribute("error").DETAILS == "UNRECOGNISED

And this manual posting bit makes for a horrible experience. If the admins don't like the post then remove it, why delay the post in the first place?


I was playing around and tried:
 if(response.Errors.GetString("DETAILS") == "LOCKED")
again and it appears to be working. Thank you Katie for the quick response and looking into this for me.

On a side note, I recommend that you request that the developers add this to the GS API Documentation at:


Makes no sense to me why GS pays for excellent customer service but wont pay one person to sit down and write comprehensive documentation.



 GSData error = response.Errors.GetGSData("DETAILS");
But this prints Null.


Oh and I'm using Unity3D not AS3.


Thanks Katie, I'm using


Hi Ian

Apologies the forum picks up on some replies to be manually applied before they can be seen.

I will look into this issue for you. What version of the GameSparks AS3 plugin are you using?



Well looks like my last post was erased, Ill write it again.

I'm trying to differentiate between an authentication error due to a wrong username and password verses one for a locked account so I can notify the user so they don't keep trying to enter their credentials when the account is locked as the OP was trying to do.

I tried:
if ( response.getAttribute("error").DETAILS == "UNRECOGNISED)
but this appears to be obsolete.

I tried:
if(response.Errors.GetString("DETAILS") == "LOCKED")
but this does not work.

How do I replicate the obsolete command:
if ( response.getAttribute("error").DETAILS == "UNRECOGNISED)


I just made a post to this forum but it has not registered... was it erased?


if ( response.getAttribute("error").DETAILS == "UNRECOGNISED)

No longer appears to be available.

I tried:
if(response.Errors == "LOCKED")

but this also does not work. How do I check whether the authentication request was rejected based on credentials verses a locked account?

I also tried:
if(response.Errors.GetString("DETAILS") == "LOCKED")

also does not work...


Thanks for replying the problem is solved.

Hi Mazhar,

Can you clarify where exactly you are having trouble?



How can I get my username and password to authenticate?


Found it:

if ( response.getAttribute("error").DETAILS == "UNRECOGNISED

Thanks for reply.

I know. I have read in documentation that there's two types of responses. That's why i'm interested. The problem is that I can't retrieve it from response object.

I'm using AS3 SDK.

Hi Irakli,

Glad you're enjoying GameSparks so far. All the errors you can see in an AuthenticationResponse are listed in the documentation under AuthenticationRequest. Can be seen here. Our documentation lists all the useable parameters and details all of the errors you can get when sending requests and receiving their response.

So, "Unrecognised" = The userName password combination did not match any existing account.

"Locked" = there have been too many failed login attempts with these details and the account has been locked temporarily.



Login to post a comment