question

My Game Studio avatar image
My Game Studio asked

GetPhotonAuthenticationToken Error

Hi,

I successfully able to login using playfab, but when i try to get the photon authentication token using the PlayFabClientAPI.GetPhotonAuthenticationToken() method. I get the Error InvalidAPIEndpoint.

10 |1200

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

brendan avatar image
brendan answered

The only time you should get the InvalidAPIEndpoint response is when there's a mismatch between the API endpoint, which follow the format "{ {TitleId}}.playfabapi.com", and the Session Ticket or Secret Key being used.

Looking in our logs, I see that you had several successful calls to GetPhotonAuthenticationToken on your Title ID earlier today. Have you already resolved this? If not, can you send the specific call being made, along with the Session Ticket, to devrel@playfab.com?

10 |1200

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

My Game Studio avatar image
My Game Studio answered

Hi, 

Thank you for the fast reply. It seem that in the PlayFabSetting.cs, I change the ProductionEnvironmentUrl variable to "{ {TitleId}}.playfabapi.com" which i should not do.

10 |1200

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

brendan avatar image
brendan answered

Correct -  ProductionEnvironmentUrl  doesn't need to be changed. It should remain ".playfabapi.com". Just set your Title ID in the TitleId variable in PlayFabSettings, and you'll be good to go.

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.