question

peg avatar image
peg asked

Likely source of NotAuthenticated errors from Unity Client API?

Getting a large number of these NotAuthenticated errors in our logs. API is only being accessed from Unity Client API. The NotAuthenticated errors seem to be spread across all the various API calls we use. Have not been able to replicate this locally, but it obviously is happening to some number of users.

Any tips on diagnosing why this might be happening? I'm also confused how since every Client API function is preceded by a if (!IsClientLoggedIn()) check, it must mean these errors are coming from Clients that think they are logged in?

If it is an issue with some kind of session time out, is there a recommended way to check for that state in Unity API?

apisunity3dAuthentication
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

·
Neils Shi avatar image
Neils Shi answered

Even Client API function is preceded by if (!IsClientLoggedIn()) check, if the session ticket has expired, the client may also think it is logged in. Please note that the session ticket is only valid for 24 hours, if players call the Client API with an expired session ticket, they will also receive the "NotAuthenticated" error. At this point, the players need to call the login API again to refresh the session ticket. If you want to refresh the session ticket silently, you can link additional anonymous login identity for players and cache the information locally for silent login. You can refer to Login basics and best Practices - PlayFab | Microsoft Docs for more detail.

10 |1200

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

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.