简体   繁体   中英

send google oauth email and password

I'm using oauth to authenticate in google calendar, but i'm trying to send user and password to avoid open the authentication popup. I'ts like automatic authentication.

Is it possible?

Thanks.

Since you want your application to always create events in a single calendar that is under your control, here is how I would do it:

  1. Create a service account in Google Cloud Console - recent instructions on how to do so can be found here: google oauth2 how to get private key for service account
  2. Share your calendar with that service account: https://support.google.com/calendar/answer/37082?hl=en
  3. Write your code to use the service account credentials (private key downloaded in step 1).

I didn't post any sample code, as I'm not sure what language you are using. The following has some discussion of this use-case in PHP: Access Google calendar events from with service account: { "error" : "access_denied" }. No google apps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM