How do I persist and update Google's oauth 2.0 Token Access?

0

I have a Google Analytics account and need Token Access to make some requests that return data from my account. Whenever I use oauth to authenticate it works fine, however, when I change pages my Token data will disappear. I have already stored them in a $ _SESSION (php) to move to another page, and it works normally, however after 1 hour the Access Token expires and no longer works, and also does not update automatically even with the Refresh Token. Can someone help me? I have been unable to resolve this problem for some time.

    
asked by anonymous 14.09.2017 / 21:02

1 answer

0

I was able to solve my problem. I found this article on the internet: link The code displayed there causes the data to be saved to a .txt file (you can choose to save to the database as well) and all data is still saved and checking to see if the token has expired.

    
15.09.2017 / 01:38