--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/HhQfQDsbPN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/8a660028-8cc1-4c93-a50c-f712aca236ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/HhQfQDsbPN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/e29ff7ce-0987-40f9-8ed1-bbf62022439a%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/94a38733-2579-4d83-85bb-743878f902b4%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/24a7e66c-2702-4bc9-a3bf-837fd765f318%40googlegroups.com.
var token = ScriptApp.getOAuthToken();
var tokenInfoEndpoint = "https://www.googleapis.com/oauth2/v2/tokeninfo?access_token=" + token;
var response = UrlFetchApp.fetch(tokenInfoEndpoint).getContentText();
var tokenInfo = JSON.parse(response);
var scopes = tokenInfo.scope.split(" ");
if (scopes.indexOf("https://www.googleapis.com/auth/drive") > -1) {
showWarning("Authorization is required", message);
ScriptApp.invalidateAuth();
}
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/HhQfQDsbPN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/421776cc-28fe-4f1e-b3a9-47507003aff8%40googlegroups.com.
While I wait to hear back from the OAuth team, one other possible workaround would be to try to access the user's root Drive folder and see if that succeeds. If it succeeds then they have the full drive scope, and if it fails then they don't.- Eric
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsub...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/HhQfQDsbPN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/14493fc1-d3d1-4eb3-b089-a080935f0838%40googlegroups.com.