简体   繁体   中英

How to authenticate app to act as if it was my logged in google account

I have written scripts connecting to the google API to connect to bigquery and google sheets and slides.

However, currently I am trying to write a script that would be able to access a non-google site for which I am required to be signed in with my gmail account to access.

So essentially when I access this site in a browser, I am asked to login using gmail and allow the site to verify my details, and in return I can view the page. If I don't login with google I cannot view the page.

I am not sure how/if the google authentication process for my app could be set up in a way for it to login as if it was myself. But can anybody give me some advice on how I can get my app to pass the google sign-in process, so that my app can access the contents of the website?

Please let me know if I can clarify.

Thanks!

If choosing not to use Google API is okay, and if it is only one specific website that you would like to access, then I would suggest looking into doing this using Selenium . You can simulate the way you use the browser so the script can do it for you. Here is a tutorial on a simple login use-case that might be relevant to your problem. Hope it helps.

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