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

  • SEARCH
  • Home
  • 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 8829725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:54:01+00:00 2026-06-14T07:54:01+00:00

I am new to GAS and I was trying to pull data from a

  • 0

I am new to GAS and I was trying to pull data from a Google spreadsheet using vizualizations query. The URI works perfect in a browser, and the spreadsheet has been published. But, the response from UrlFetchApp doesn’t make sense since the data is published, no auth needed. here is my code:

function test () {
  var url = 'https://docs.google.com/a/1ins.us/spreadsheet/tq?&key=<secretkey>&alt=json';
  var q = '&tq=Select S,count(A) Where A is not Null Group By S pivot N';
  var data = UrlFetchApp.fetch(url+q).getContentText();
  data = data.slice(39,-2); //remove the callback function, is there a way to exec the function?
  Logger.log(data);
}

here is the error returned in JSON:

{"version":"0.6","status":"error","errors":[{"reason":"user_not_authenticated","message":"User not signed in","detailed_message":"\u003ca target=\u0022_blank\u0022 href=\u0022https://docs.google.com/spreadsheet/\u0022\u003eSign in\u003c/a\u003e"}]}

What am I missing?
I read that google does not want Google.Visualizations used in GAS. Is this a consideration to this problem?

  • 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-14T07:54:03+00:00Added an answer on June 14, 2026 at 7:54 am

    My guess is that the spreadsheet is not open to the public. Try accessing the URL in an incognito window and see if it prompts you to login. Some domains don’t allow data to be shared outside the domain.

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

Sidebar

Related Questions

I'm currently testing GAs new async code snippet using two different tracking codes on
new on ruby and using windows xp and rails 3, i want to send
New to PHP and MySQL, have heard amazing things about this website from Leo
new to c#. I'm trying to make a simple system where I can search
New to Node.js and Express, I am trying to understand the two seems overlapping
New programmer here, I am trying to understand and break down this code below
New developer here,Im using the Custom Image Picker by ray wenderlich. But what I
New to wordpress and web design in general. I'm trying to setup a website
Here's the code i'm using to rotate: Dim m As New System.Drawing.Drawing2D.Matrix Dim size
I'm a beginner, I want to fetch data from Zoho Crm and then insert

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.