B
B
Bohdan Yarema2016-03-02 17:23:59
PHP
Bohdan Yarema, 2016-03-02 17:23:59

How to load data from Google Analytics Api php via cron?

I made a script that takes information from analytics and writes to the database, but the token exists only for 1 hour, how can I make it possible to run the script with cron? and the token lived for a very long time or how to update it without re-authorization?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kkeng, 2016-12-22
@kkeng

Set up an API for offline access. In this case, a refresh token will come along with the token.
Use it to get a new token.
Here is the instruction https://developers.google.com/identity/protocols/O...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question