Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

132
Views
How to automate O-Auth2 web browser opening to get access token?

So I am working with google sheets API , where I need to authorize the credentials before I can hit api for my account , for that OAuth2 client provides an auth URL which opens in browser and there I have to login in Gmail account and then accept the permissions and then it redirects to a redirect URI and in it's URL there is a code.

But I want to get all this done automatically as this will be part of my backend code , and I want it be automated without me going to browser and logging in . Can this be done using puppeteer ? or anything else ?

7 months ago · Juan Pablo Isaza
1 answers
Answer question

0

The only option to avoid user interaction is to use a service account with domain-wide delegation. And to use this, you need to be a Workspace domain admin, and you can only act on behalf of users in your Workspace domain.

If you are not a domain admin, there's no way to avoid the workflow you mentioned, with user interaction.

Reference:

  • Using OAuth 2.0 to Access Google APIs
7 months ago · Juan Pablo Isaza Report
Answer question
Find remote jobs