question

steelfox001 avatar image
steelfox001 asked

Photon Room create

Hi. I tried to understand tutorial (https://api.playfab.com/docs/tutorials/landing-tournaments/using-photon-with-playfab) it's not updated.

I got Photon ticket!!!!!

Now I want to connect

-----------------------------------------

voidOnPhotonTokenReceived(GetPhotonAuthenticationTokenResultresult){

stringphotonToken=result.PhotonCustomAuthenticationToken;
Debug.Log(string.Format("Yay,loggedininsessiontoken:{0}",photonToken));
PhotonNetwork.AuthValues=newAuthenticationValues();
PhotonNetwork.AuthValues.AuthType=CustomAuthenticationType.Custom;
PhotonNetwork.AuthValues.Token=photonToken;
PhotonNetwork.AuthValues.UserId=PlayFabID;


PhotonNetwork.ConnectUsingSettings("1.0");

}

--------------------------------

I got 2 errors in Unity

1) Operation failed: OperationResponse 230: ReturnCode: 32755 (Failed to parse token from request). Parameters: {} Server: NameServer UnityEngine.Debug:LogError(Object)

2)Custom Authentication failed (either due to user-input or configuration or AuthParameter string format). Calling: OnCustomAuthenticationFailed()

What i made wrong?

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

For issues using the Photon SDK, you'll need to contact the Exit Games team directly, as they own and support their SDKs. @Hamza Lazaar may be able to assist, as well.

10 |1200

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

steelfox001 avatar image
steelfox001 answered

If I change PhotonNetwork.ConnectUsingSettings("1.0"); to

PhotonNetwork.ConnectToBestCloudServer("1.0");

Debug.Log("resultconection"+PhotonNetwork.connecting);

Console show True.

But Void OnJoinedLobby() - didn't start

2 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.

Hamza Lazaar avatar image Hamza Lazaar commented ·

Hi @steelfox001,

Thank you for choosing Photon!

Please use proper authentication code as shown in docs:

Replace:

PhotonNetwork.AuthValues.Token=photonToken;

With:

PhotonNetwork.AuthValues.AddAuthParameter("username", id);
PhotonNetwork.AuthValues.AddAuthParameter("token", ticket);
1 Like 1 ·
steelfox001 avatar image steelfox001 Hamza Lazaar commented ·

Thank you.

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.