google service account example returns “Error refreshing the OAuth2 token { “error” : “invalid_grant” }”
问题 My goal is to make the simplest query on Google Fusion Tables on behalf of my web app users. For that, I created a service account on google console. Here is the code: // Creating a google client $client = new \Google_Client(); // setting the service acount credentials $serviceAccountName = 'XXXXX.apps.googleusercontent.com'; $scopes= array( 'https://www.googleapis.com/auth/fusiontables', 'https://www.googleapis.com/auth/fusiontables.readonly', ); $privateKey=file_get_contents('/path/to