This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi evryone,
I need to "automate" the extraction of data from Google Calendar API;
The mechanism of authentication is the OAUTH 2.0, personally I've developed a workflow that:
1- Let the user authenticate on gmail(displaying it a link) to get its first Code;
2- This code will be used into more download tool to extract an access token or a refresh token(with a usage limit).
I want to try to automate the first phase using the library Selenium from Python:
- Is it actually possible?(i can insert a Python tool at the beginning of the workflow);
- Is it something that can actually work on the Server(the code will needs to open a browser and replicate authentication behaviour)?
Thank you,
T.
Solved! Go to Solution.
This is a complex problem. Your first step should be looking at solutions to similar problems. The first three post from the recommendations above and right, deal with selenium and OAuth and all of them have solutions.
Look at how these people solved their problems and try to adapt those solutions to your specific needs. If you have a specific issue at any step in the process, post the workflow that you have adapted so far and I'm sure that someone here will be able to help you.
Dan
After some interventions I've solved the problem without the usage of Selenium.
For anyone that could be interested, a complete automation of Google API(Calendar, Sheets etc..) usage can be achieved through the setup of a Service Account, then If you want to get any access_token without any login effort by a user:
- using HTTP requests;
- using Python client library;
check that link(https://developers.google.com/identity/protocols/oauth2/service-account).
The solution works also on Server environment.