question

Alex Cassell avatar image
Alex Cassell asked

Invalid input parameters LoginWithGoogleAccountRequest on Android

I am pretty much (maybe entirely at this point) using the script from the tutorial on Google Auth and I keep getting this same error. It tells me thet "One of the following properties must be defined: ServerAuthCode, AccessToken, EncryptedRequest." This is the part of the code I believe is having an issue. If you have any idea what I am doing wrong, it would very helpful, thank you in advance.

 Social.localUser.Authenticate((bool success) => {
            if (success)
            {

                GoogleStatusText.text = "Google Signed In";
                var serverAuthCode = PlayGamesPlatform.Instance.GetServerAuthCode();
                Debug.Log("Server Auth Code: " + serverAuthCode);

                PlayFabClientAPI.LoginWithGoogleAccount(new LoginWithGoogleAccountRequest()
                {
                    TitleId = PlayFabSettings.TitleId,
                    ServerAuthCode = serverAuthCode,
                    CreateAccount = true
                }, (result) =>
                {
                    GoogleStatusText.text = "Signed In as " + result.PlayFabId;

                }, OnPlayFabError);
            }
            else
            {
                GoogleStatusText.text = "Google Failed to Authroize your login";
            }

        });
Authenticationandroid
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

I've tested the Google login API call, and it appears to be working fine. Can you try making this call from Postman, and see what the results are? If you get the same result, can you post the specifics of the actual values you're passing in as the parameters, and the full body of the response?

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.