I have several bots that read data for offices in order to obtain potential customers and one of the sites I use to do this requires authentication where you need the login + password of the user who is accessing and an authentication code from google authenticator. However, this code is generated in a google app for android (Google Authenticator) and I need to extract this code and use it in the backend of another application.
Currently I can get this token using a bot that takes a screenshot of the screen and extracts the token using OCR, but this is very costly and takes a long time because it is an action that sometimes requires several authentications for each search.
I need a way to make this extraction simpler. I did some digging and only found stuff related to Oauth2 authentication that doesn't work for me. Does anyone have a light?
PS: The token is generated on my smartphone with my credentials. Forgive the lack of information, there is no illegality.