question

Ben R. avatar image
Ben R. asked

Seeing lots of notauthenticated errors with Kongregate users - how to recover?

This is what the API errors looks like for my game (~10k daily users):

This is on Kongregate only. What I think is happening is that players are logging in and then leaving the game open for days ... and the session token expires. How should I recover from this? Is it possible to without change on the Kongregate side? Could something else explain so many errors?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

All Client API calls to PlayFab, apart from login and password reset, require a valid session ticket. If the ticket has expired for a client, the error returned is "NotAuthenticated". You should always check for that response and, if it occurs, re-authenticate the user (preferably using a Device ID or Custom ID whenever possible, so that this is invisible to the user).

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ben R. avatar image Ben R. commented ·

@Brendan thanks for the answer ... I understand the issue but I'm not sure what's actually causing it. AFAIK the Kongregate game token never expires so is it that the Playfab login validity has expired?

0 Likes 0 ·
brendan avatar image brendan Ben R. commented ·

Correct - PlayFab session tickets expire after 24 hours. Calls to PlayFab Client API methods require a valid session ticket, so 24 hours after you sign into a PlayFab account, you'll need to get a new ticket. We will be updating the session system in the near future, but the NotAuthenticated error will remain the right way to check for an expired ticket, so that would be the way to resolve this issue.

1 Like 1 ·
Ben R. avatar image Ben R. brendan commented ·

Ah that's got to be it then ... thanks for the confirm!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.