I want to print documents generated in php by cloud print. In general, I did everything, but I have a problem with the expiration of the key. I'm using it: https://github.com/yasirsiddiqui/php-google-cloud-print I generate an access key, everything works, but it expires after about 30 minutes. I want to use this as a cron for printing every few hours so I want to set the key expiration for e.g. 1 year. I found something like this: https://cloud.google.com/apigee/docs/api-platform/antipatterns/oauth-long-expiration but i don't know how to apply it. Thanks for your help in advance.
I found a solution to this problem, if someone would have the same problem you need to do this:
$offlineAccessConfig = array(
'access_type' => 'offline',
'approval_prompt' => 'force'
);