Automating token generation for Sales Reporter API using Automation of Reporter API Sales.generateToken()

Hi.

I've already posted a question about this 2 months ago but never got a response from anyone. I find it very hard to believe that no one has implemented a fully automated Sales scraping pipeline, so I would like to repeat my question as described here: https://developer.apple.com/forums/thread/660657

Essentially I would like to find out how it is possible to automate token generation for the sales api - as the tokens expire every 6 months and I dont fancy having to manually regenerate multitudes of tokens across multiple servers...

Since directly piping values into the initialisation
java -jar Reporter.jar p=Reporter.properties Sales.viewToken results in null, I have figured out the implementation is using Console.readPassword() (https://stackoverflow.com/a/45477249/7691338 ), so I am wondering if there is a workaround for this at all?

I've wasted a lot of time trying to automate this, env variables, piping, feeding from a temporary file, NOTHING seems to work. Please, someone, help. I found several people's data scraping implementation, but this is the thing I have not seen ANYONE solve. Perhaps this means that the developers did this intentionally, or it is a bug that's never been raised?

Thanks
Automating token generation for Sales Reporter API using Automation of Reporter API Sales.generateToken()
 
 
Q