I'm currently creating a tool to help me create google analytics daily reports easily. To do this, I need to access google analytics data at specific hours and days (for example, each day at 9am and 9pm), server side (PHP, Laravel).
The problem is that when I use the OAuth 2 authentication method, I need to re-login each time I want to access data (i need to redirect the user, and wait for redirection to get the code, and use it to get a token). I can use the "service account" method, but it implies to use a .p12 certificate, which is not sustainable in production (i can't ask my users to upload their certificates files).
Do you know a way, or have you an idea, to access analytics data without having to relogging (ideally with oauth...) or using service account method (with a certificate file) ?
Thank you