I have a spreadsheet (V2-style, "new" spreadsheets) that I have allowed 
public Can View access (will adjust once I get the simplest case working).

I am attempting to grab a chunk of data via the JS Visualization library, 
but I seem to continually get a redirect.

My code:

function drawChart() {
  var url = 
"https://docs.google.com/a/vendasta.com/spreadsheet/tq?range=A2:A31&key=1jsq_BdcpRQ...[snip]...qQg&gid=855264867&headers=1";;
  var query = new google.visualization.Query(url);
  query.send(handleQueryResponse);
} 


google.load("visualization", '1', {packages:['corechart']});
google.setOnLoadCallback(drawChart);


This yields the following interaction:

Request URL: 
https://docs.google.com/a/vendasta.com/spreadsheet/tq?range=A2:A31&key=1jsq_BdcpR
...[snip]...qQg&gid=855264867&headers=1&tqx=reqId%3A0


   1. status:
   302 Moved Temporarily
   2. location:
   https://docs.google.com/a/vendasta.com/spreadsheets/d/1jsq_BdcpRQ
   ...[snip]...qQg/tq?range=A2:A31&gid=855264867&headers=1&tqx=reqId:0
   

Request URL: 
https://docs.google.com/a/vendasta.com/spreadsheets/d/1jsq_BdcpRQ
...[snip]...qQg/tq?range=A2:A31&gid=855264867&headers=1&tqx=reqId:0


   1. status:
   404 Not Found
   

Following the docs here: 
https://developers.google.com/chart/interactive/docs/spreadsheets


I've tried a number of different URLs to no avail. The docs and the Code 
Playground don't seem to have any consistency over what is the correct url 
to use.


1. What is the correct url to access data via this mechanism?
2. (less important given the answer above) Why is the above interaction 
redirecting to a 404?

Thanks,
j

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to