title: refresh token "error" : "invalid_client" on google app script - new feature upgrade auth
body: <p>I am very happy with the new feature <a href="https://developers.google.com/apps-script/scripts_google_accounts#authUpgrade" rel="nofollow noreferrer">authUpgrade</a> but I am getting -  <code>&quot;error&quot; : &quot;invalid_client&quot;</code>  when I try to fetch a new refresh token. How can I fix this?<br>
  Here is my code:</p>
  <pre><code>var oAuthConfig = UrlFetchApp.addOAuthService(&quot;blogger&quot;);
  var code = UserProperties.getProperties();
  var tokenEndpoint = &quot;https://accounts.google.com/o/oauth2/token&quot;;
  var postPayload = {
    &quot;refresh_token&quot; : code.refresh_token,
    &quot;client_id&quot; : code.clientId, // also trying &quot;8774700966@developer.gserviceaccount.com&quot;
    &quot;client_secret&quot; : code.clientSecret,
    &quot;grant_type&quot; : &quot;refresh_token&quot;
  };
  
   var options = {
    &quot;method&quot; : &quot;post&quot;,
    &quot;payload&quot; : postPayload
  };
  var response = UrlFetchApp.fetch(tokenEndpoint, options);
  </code></pre>
  <p>Thx in advance</p>
  <p>Metamorfoself</p>