Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open document #18

Closed
Radzhab opened this issue Aug 14, 2015 · 14 comments
Closed

Cannot open document #18

Radzhab opened this issue Aug 14, 2015 · 14 comments

Comments

@Radzhab
Copy link

Radzhab commented Aug 14, 2015

I reg app, generate key.p12 and run app. When i debug program i see url of created doc. When i open url
i see on page this message

approval required

If you want to view the file? Contact the owner or sign-in to the right of access. Read more ...

You are not logged [email protected].

Why? Fact I'm the owner of the mail and doc.

@mausch
Copy link
Owner

mausch commented Aug 14, 2015

You need to use the email address provided by Google in the page where you download the P12 key. ( https://console.developers.google.com/project )

It's something like [email protected]

@Radzhab Radzhab closed this as completed Aug 14, 2015
@Radzhab Radzhab reopened this Aug 14, 2015
@Radzhab
Copy link
Author

Radzhab commented Aug 14, 2015

i make it. http://savepic.ru/7689065.jpg.

            var client = new DatabaseClient("1015218190882-pjhdevvetamjn0a3dtk6s3pbthsmognl@developer.gserviceaccount.com", File.ReadAllBytes("zenno-ff89e9a7db0e.p12"));
            const string dbName = "test";

            var db = client.GetDatabase(dbName) ?? client.CreateDatabase(dbName);
....

What i make wrong?

@mausch
Copy link
Owner

mausch commented Aug 14, 2015

Are you sure you followed all the steps in https://github.com/mausch/GDataDB#gdatadb ?

@Radzhab
Copy link
Author

Radzhab commented Aug 14, 2015

the same situation
register app

@mausch
Copy link
Owner

mausch commented Aug 14, 2015

I can't read Russian. Are you sure you gave your gserviceaccount account permissions over your document?

I have this running in production already, so it's likely that you're missing some step. It's normal, Google has made this a pretty complex process now.

@Radzhab
Copy link
Author

Radzhab commented Aug 14, 2015

this is translating

approval required

If you want to view the file? Contact the owner or sign-in to the right of access. Read more ...

You are not logged [email protected].

I have only one google account. No more.

@mausch
Copy link
Owner

mausch commented Aug 14, 2015

Right, so it looks like you still need to share that document with your gserviceaccount account, i.e. log in to Drive as mesteruh, click "share" on the document (I'm assuming mesteruh is the owner of the document in question), and give the gserviceaccount account permissions to edit.

@Radzhab
Copy link
Author

Radzhab commented Aug 14, 2015

https://drive.google.com/open?id=0B9Ae6hWx4-miTWJ3eXhQQlB2SGM i recorded my actions.

ps. In google drive i cannot see file "test". I think that program create it.

@mausch
Copy link
Owner

mausch commented Aug 14, 2015

Oh, you want to access a document created with the API through the Drive Web UI using your personal gmail account? If that's the case, it's not possible at the moment because we'd have to change the document permissions through the API to share it with your personal account. This is not implemented at the moment, I just created a new issue #19 .
If this is your scenario I recommend creating the document in the web UI using your personal account and then sharing it to the gserviceaccount account.

@Radzhab
Copy link
Author

Radzhab commented Aug 14, 2015

https://goo.gl/R7SHMZ i upload new video and change interface language)

@Radzhab
Copy link
Author

Radzhab commented Aug 14, 2015

when i click "Request Access" in Chrome console i see this

@Radzhab
Copy link
Author

Radzhab commented Aug 15, 2015

and what?)

@mausch
Copy link
Owner

mausch commented Aug 15, 2015

If you need fast answers, I'm available for consulting. Otherwise all free support is done basically whenever/if I feel like it.

I've watched your latest video and you're still not sharing the document with the gserviceaccount account as I said. You're only sharing it with "mesteruh". You need to share it with "1015218190882-pjhdevvetamjn0a3dtk6s3pbthsmognl@developer.gserviceaccount.com". They're separate, unrelated accounts. Giving public access to "anyone with the link" apparently is not enough for the Drive API. I recommend not doing this.

Also, when creating a new worksheet to be accessed by GDataDB, either leave it blank or set the first row with the correct field names, otherwise GDataDB will throw.

By now you probably have two documents named "testGIT": one owned by "mesteruh" and another one owned by the gservice account. You should probably delete the one owned by the gservice account before trying to access the shared one owned by mesteruh.

By the way, you can't expect to paste any URL you see in an API into a browser and expect that something sensible will happen.

@Radzhab
Copy link
Author

Radzhab commented Aug 15, 2015

Спасибо мужик!)

@mausch mausch closed this as completed Aug 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants