apps-script-oauth2 icon indicating copy to clipboard operation
apps-script-oauth2 copied to clipboard

The `getRedirectUri()` code sample in the README is invalid

Open koconnor3 opened this issue 3 years ago • 2 comments

The getRedirectUri() code sample is invalid. getService() is not defined, and neither is OAuth2.getService()

/**
 * Logs the redirect URI to register.
 */
function logRedirectUri() {
  var service = getService();
  Logger.log(service.getRedirectUri());
}

koconnor3 avatar Jul 22 '22 14:07 koconnor3

I had the same problem, I have done this instead to get the Uri :

function getUrl(){
  Logger.log(OAuth2.getRedirectUri());
}

In the code, I found getService_()but I had the same issue.

FFredericAL avatar Sep 06 '23 14:09 FFredericAL