Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7816445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:52:21+00:00 2026-06-02T05:52:21+00:00

I am working with Apps Script on a Google Site and I am trying

  • 0

I am working with Apps Script on a Google Site and I am trying to use Oauth to authenticate the gadget as the active user to show the active users documents list. I have found several Google group discussions asking about this with no answers, was hoping I could get an answer on here. Here is my code:

var oauthConfig = UrlFetchApp.addOAuthService(“gDocs”);
oauthConfig.setAccessTokenUrl(“https://www.google.com/accounts/OAuthGetAccessToken”);
oauthConfig.setRequestTokenUrl(“https://www.google.com/accounts/OAuthGetRequestToken?scope=https://docs.google.com/feeds/”);
oauthConfig.setAuthorizationUrl(“https://www.google.com/accounts/OAuthAuthorizeToken”);
oauthConfig.setConsumerKey(“myDomainName”);
oauthConfig.setConsumerSecret(“myCosumerSeceret”);

var options =
{
“method”: “GET”,
“headers”: { “GData-Version”: “3.0” },
“oAuthServiceName” : “gDocs”,
“oAuthUseToken” : “always”
};

var results = UrlFetchApp.fetch(“https://docs.google.com/feeds/default”, options);

At this point the code does not run and the page with the gadget displays:
Authorization is required to perform that action.

Any assistance would be greatly appreciated.

Thank you,
James Krimm

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:52:23+00:00Added an answer on June 2, 2026 at 5:52 am

    It’s not possible to access the active user data. A published Apps Script, as on a site, runs under the account of the script owner, called effective user. And, as a security concern, the script owner does not have permission to access any data of the active user.

    So, what @claudio suggests (of using builtin DocsList) is not possible.

    Unless we’re talking about a Google Apps domain (and not regular consumer accounts) and the script owner is the domain administrator. In which case he can use the Google Docs List Data API to impersonate any user on his domain.

    Either way, the consumer key and secret should always be “anonymous”, regardless this scenario.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working with the google docs api found here: https://developers.google.com/google-apps/documents-list/#introduction This issue
I am working on two apps that use an MSMQ as a message bus
I have customised a menu in Google Spreadsheet using Google Apps Script. The problem
I'm trying to get a handler mapping working with Google App Engine. The regex
I am working on an automated test script to create test users and connect
I am working on android apps. I want to add a contact in android
I am used to working with ASP web apps and creating .aspx pages. I
I am working on a web-app system that has multiple apps, each with a
We've been working on web application where in we need to implement traditional web-apps
I'm currently diving into Backbone.js, and working on a few complex web apps. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.