Problem scenario:
I have a private google site, to which only limited users can access.
Within the site, I have a gadget which uses Oauth proxy.
The gadget uses standard visualization query, my urls use the "tq" query format, e.g 'https://spreadsheets.google.com/tq?'+'key='+spreadSheets[i].key+'&pub=0';
I use query.send() method.
Oauth approval page sequence is followed, if required.
After that I always get a "User not signed in" response with "Sign in" link, even though user logged in to the private google site(he is directly taken to google account login page on accessing the site).
Once the user click on "Sign in", it opens a new tab with url as "https:/spreadsheets.google.com/spreadsheet", and its a blank spreadsheet. I close this tab displaying blank spreadsheet.
After that I refresh my site page (with gadget), it doesn't require "sign in".
Oauth Scopes used are:
<Request url="https://www.google.com/accounts/OAuthGetRequestToken?scope=https://spreadsheets.google.com/tq/%20https://spreadsheets.google.com/spreadsheet/%20https://spreadsheets.google.com/feeds/" method="GET" />
Alternative approach tried:
I tried explicit gadgets.io.makerequest with the above tq format plus the tqrt parameter and tqx parameter.
But always get "user_not_authenticated" response (same as above)
Any pointers/solutions appreciated. I have broken my head over this for last few days.