Unfortunately, I'm on a PC and can't verify your behavior at the moment. I'm not familiar with the sample, but it looks like it may be saving state? http://code.google.com/p/gdata-objectivec-client/source/browse/trunk/Examples/DocsSample/DocsSampleWindowController.m#590
Does the same thing happen on a fresh run of the sample using the clssrmt account? Another question, does the download and/or view button open up a browser window? Again, if it's opening up the RawDocContents URL the browser, the correct cookie (google account) needs to have been set to view the file. That's based off of your last login to docs.google.com. Regardless, you should be able to view the contents by changing the login to an account that has access to that file. Clicking 'sign in as a different user' should do the trick. Eric On Dec 29, 11:16 am, David <[email protected]> wrote: > Eric, > > I think you missed my point. I would expect the API and Safari to be > independent. But I am finding that they are not independent. The > fact that I am logged into Google Docs via Safari affects the API's > access to the files seems like an issue. Another test I did today was > use the same Examples/DocsSample.xcodeproj application. I logged in > using the first login ( [email protected]) got a list of files and > then "Downloaded" the file. I then changed the login and password > fields to the second login ( [email protected]) and got a list of > files which are owned by the second login. Clicking on the "Download" > button I get a similar error message in the downloaded .html file: > ... > <b>We're sorry, but [email protected] does not have access to this > document.</b> > </p> > <p class=app style="padding-top: 15px"> > You are signed in as <b>[email protected]</b>, but that email > account > hasn't been granted permission to this document.<br/><br/> > Please <a href='logout' class="app">sign in as a different user</a> > ... > > Seems like the Download portion of the API is NOT using the > Authentication token in the header. > > Thanks, > > On Dec 28, 9:23 am, "Eric (Google)" <[email protected]> wrote: > > > Hi David, > > > If I understand correctly, I think what you're seeing here > > is that Safari is storing a login cookie for the 'dave94' account. > > (It's the last account you've logged into docs.google.com with) > > > Then, if you try opening a doc from API results, the browser > > tries to use the 'dave94' account to view that doc. The problem is, > > you used the 'clssrmtest' Google Account to authenticate to the API. > > > In short, the API and docs.google.com login are separate. The > > cases where this would work is > > - you're using the same account for the API and that Safari has saved > > - the two accounts have access to the same file. > > > Make sense? > > > Eric > > > On Dec 26, 10:26 am, David <[email protected]> wrote: > > > > I am working on a project where multiple Google logins may be used on > > > one computer. If the application tries to access files from more than > > > one Google Docs login I was getting an error. So I check the Example > > > applications that were included in the API download. > > > > I have found that if I have logged into docs.google.com in Safari with > > > one account ([email protected]) and viewing my list of files. I > > > then run the Examples/DocsSample.xcodeproj application and use a > > > different login ([email protected]). I get a list of the available > > > files that belong to the "clssrmtest" account, but after selecting a > > > file and clicking the "view" button I get a web page that has the > > > following message: > > > > > We're sorry, but [email protected] does not have access to this > > > > document. > > > > > You are signed in as [email protected], but that email account hasn't > > > > been > > > > granted permission to this document. > > > > > Please sign in as a different user or request access to this document. > > > > > Find out more about this topic at the Google Docs Help Center. > > > > If in Safari I select the "Sign Out" button then I am able to get the > > > "clssrmtest" files using the DocSample application. > > > > 1. Is this a known issue? > > > 2. Shouldn't DocSample be independent of the login used by Safari? > > > > Thanks for your help. > > > > David Fichou --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Docs Data APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Docs-Data-APIs?hl=en -~----------~----~----~----~------~----~------~--~---
