Problem implementing google oauth authentication


I am trying to implement google oauth login for my unity game. Am currently doing the following stuff

  void Start()
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()

        // recommended for debugging:
        PlayGamesPlatform.DebugLogEnabled = true;
        // Activate the Google Play Games platform

when a button is pressed

 public void OnButtonPress()

private void AuthoResponse(CommonStatusCodes result,string status)
        Debug.Log("status of autho:"+result.ToString()+"


the above code returns a internal error when “GetServerAuthCode” method is called. I have tried to get access token using “PlayGamesPlatform.Instance.GetAccessToken()” it doesn’t return any data.

I searched for documentation, but there was not much related to unity. Can you please point me in the right direction.

Thank you.

I had no luck with this either but you can call RequestServerAuthCode(false) now (at least with the 0.9.42 version of gpgs) and also there is RequestEmail() for PlayGamesPlatform.Instance. They still return null for my end right now but maybe that’ll help you :slight_smile: