[PlayFab] app not associated with title/no chat id

deaverinc
deaverinc
edited March 2022 in Any Topic & Chat

first, how long does it take to setup the title id on the server for authentication? i followed the process and have been waiting an hour but still get the error:


/Client/GetPhotonAuthenticationToken: PhotonApplicationNotAssociatedWithTitle

UnityEngine.Debug:LogError (object)


second, how do i get a chat id? i am using photon cloud and have tried to select every option when creating a new app but none of them will give me a chat id. what am i doing wrong?

Best Answer

  • JohnTube
    JohnTube ✭✭✭✭✭
    Answer ✓

    Hi @deaverinc,

    Please replace

       PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppVersion
    

    with

       PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime
    


Answers

  • JohnTube
    JohnTube ✭✭✭✭✭

    Hi @deaverinc,

    Thank you for choosing Photon!

    I don't see any mention to PlayFab in your post although this error is from PlayFab.

    when you create a new app from dashboard you can specify it's type: Chat.

    Otherwise, you need to properly configure Photon addon on PlayFab.

    Follow PlayFab's guide as well: here, although it's meant for Realtime/PUN, you can skip the steps specific to Webhooks and set Chat AppId in Photon add-on.


  • i tried that but it does not give me a chat id, what else can i do?

  • lets start from the beginning. my first question was how long do i have to wait for the setup the title id on the server for authentication?


    i still am getting the error:


    /Client/GetPhotonAuthenticationToken: PhotonApplicationNotAssociatedWithTitle

    UnityEngine.Debug:LogError (object)


    i followed the tutorial to setup this. i login, my app is photon cloud, i am using realtime, i click on manage:


    it asks for a url, i entered:


    Authentication URL

    https://C03A0.playfabapi.com/photon/authenticate

    unchecked allow anonymous clients and clicked the create (i think button, it is not present anymore)


    it said to wait for a while so the information can propagate to all servers. it has been 24 hours.


    How long should i wait? what else should i do?

  • to be sure i have logged in to playfab, clicked on my studio for elemental, clicked on add ons, clicked on photon multiplayer and chat, photon is installed, i entered the realtime app id, clicked on save settings since it never gave me a chat id i didnt enter it. what else is there? i am at a lose.

  • public static void LoginSuccessStartAccountInfo(string playfabId)

      {

        string PlayFabId = playfabId;

         Database.UpdateDatabase();

        AccountInfo.GetAccountInfo();

        GetPhotonAuthenticationTokenRequest request = new GetPhotonAuthenticationTokenRequest()

        {

          PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppVersion


        };

        PlayFabClientAPI.GetPhotonAuthenticationToken(request, OnPhotonAuthSuccess, GameFunctions.PlayFabAPIFailure);

        Debug.Log("login successful " + request);

      }


    static void OnPhotonAuthSuccess(GetPhotonAuthenticationTokenResult result)

      {

        AuthenticationValues customAuth = new AuthenticationValues();

        customAuth.UserId = Instance.playFabId;

        customAuth.AuthType = CustomAuthenticationType.Custom;

        customAuth.AddAuthParameter("username", Instance.playFabId);

        customAuth.AddAuthParameter("Token", result.PhotonCustomAuthenticationToken);

        customAuth.Token = result.PhotonCustomAuthenticationToken;


        PhotonNetwork.AuthValues = customAuth;

        PhotonNetwork.ConnectUsingSettings();

      }


    i even removed the line:


    customAuth.Token = result.PhotonCustomAuthenticationToken;


    i am not trying to use any webhooks.

  • not sure why my code doesnt work but i copy and pasted from the tutorial and now it works. i will leave it at that.

  • actually that is not right, i am still getting the error. i dont know what else to do.

  • If you are still working on this error "GetPhotonAuthenticationToken: PhotonApplicationNotAssociatedWithTitle", I think you may want to ask the PlayFab team. This seems to be an issue on their side, really. Yes, it names Photon but they seem to issue the token.

    It seems to be an issue with the setup of your app.

  • JohnTube
    JohnTube ✭✭✭✭✭
    Answer ✓

    Hi @deaverinc,

    Please replace

       PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppVersion
    

    with

       PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime