triggers - OAuth 2.0 in background while creating events on GCAL from Salesforce using Google Calendar API v3 (REST API) -


my situation: i'm trying populate shared google calendar when event created on salesforce interface. im using latest google calendar v3 (restful) api same https://developers.google.com/google-apps/calendar/ apex development language.

i'm using trigger catches value fields (trigger.new) , passing values class json serialization, authentication , api call.

till now, able data object , pass class , serialized. need oauth 2.0 call before can make google calendar api call. https://developers.google.com/google-apps/calendar/

i have setup application on google api console , obtained client id, client secret etc.

the usual way oauth 2.0 works authentication page pops-up waiting user grant access api can access calendars linked users account.

my question: there way can oauth done in background using static/private key either obtained granting access once not every time or programmatically using key value in class authenticate user.

looking forward getting useful suggestions/inputs/help everyone.

if user --once-- have made authorization got access_code , refresh_code. found helpful store both codes application (here firefox , password manager). next start of application (firefox/extension) use refresh_code request new access_code. used during session further calendar call.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -