Question Google API

mcorbeel

Member
Joined
Feb 7, 2011
Messages
6
Location
Belgium Europe
Programming Experience
10+
I'm looking for a way to read & write to other Gmail user's calendar.
I've been searching for days now on Google's developper web site but nothing seems to be clear to me.
As far as I know I will have to use oAuth to get permission from each user, but I don't find any vb.net samples on this.
Neither do I know which type of API I best use for this purpose.
Can anyone point me in the best direction?
 
Hi Herman, thanks for your reply...
This is indeed the page I've been reading several times now.
My first issue is: what type off client ID should I create (web app, installed app, or service account)? The type explanation is not clear to make and I don't want to start of on the wrong foot.
It is gonna be a Windows (vb) app that takes data out of a db and read & write it to a user's calendar in gmail. So if I guess I need a "service account", is this correct?
Second issue: how does the user gets notified that there is an app somewhere that want to access his calendar?
 
Hi Herman, thanks for your reply...
This is indeed the page I've been reading several times now.
You also need to read related pages, especially the pages describing the different client IDs.
mcorbeel said:
My first issue is: what type off client ID should I create (web app, installed app, or service account)? The type explanation is not clear to make and I don't want to start of on the wrong foot.
It is gonna be a Windows (vb) app that takes data out of a db and read & write it to a user's calendar in gmail. So if I guess I need a "service account", is this correct?
No, service id is for when you want your app to work on its own, without any user intervention or user authentication. See these quotes from documentation also:
docs said:
account that belongs to your application instead of to an individual end user
docs said:
Typically, an application uses a service account when the application uses Google APIs to work with its own data rather than a user's data
mcorbeel said:
Second issue: how does the user gets notified that there is an app somewhere that want to access his calendar?
Installed application id, using system browser to authenticate.
docs said:
The authorization sequence begins when your application redirects a browser to a Google URL; the URL includes query parameters that indicate the type of access being requested. Google handles the user authentication, session selection, and user consent. The result is an authorization code, which the application can exchange for an access token and a refresh token.
 
John, thanks a lot for your reply.
About the client ID type. You wrote that I should not use "service account" because it works without user's intervention. But that is exactly what I want to do. My application will take data out of a local db on my server and has to write it in the user's gmail calendar. The user will of course once have to give approval to do so, but afterwards it should work without his interaction.
Can this be done you think?
 
John, thanks a lot for your reply.
About the client ID type. You wrote that I should not use "service account" because it works without user's intervention. But that is exactly what I want to do. My application will take data out of a local db on my server and has to write it in the user's gmail calendar. The user will of course once have to give approval to do so, but afterwards it should work without his interaction.
Can this be done you think?
No, service accounts doesn't have access to user data. You use Installed app type, user will then have to approve that your app can access that users calendar. User will normally only approve access once, but can revoke that access anytime.
 
Back
Top