Automation of generation of grant token

Automation of generation of grant token

My application which is developed in python requires me to use the Zoho books to create payment links, invoices and others whenever there is a requirement. I have gone through the entire docs of the Zoho books and there is grant token that needs to be manually generated from the console or a link. I need an automated process and manual generation of the grant  token does not help me. Is there are any python api where I can generate the grant token using a script?