Hi,
I really dont got how to give the application permanent access to the google analytics api by using a refresh token.
I set the AccessType to offline, but still every time i close my browser i have to login again.
$client = new Google_Client();
$client->setClientId(CLIENT_ID);
$client->setClientSecret(CLIENT_SECRET);
$client->setRedirectUri(REDIRECT_URL);
$client->setApplicationName(APP_NAME);
$client->setAccessType('offline');
$client->setScopes(array(ANALYTICS_SCOPE));
I use the simple /example/analytics/demo/index.php without any changes. Im really new to this OAuth stuff the google documentation is not a big help at all, as it's not referring to the google-api-php-client.
The thing is, that the refresh token would need to be stored somewhere right? But I dont see a function like this in the demo.
So how would I do that?
There are only some urls and no word about how to use them - Do I have to post them with curl?
Seems I have to find a different way without google-api-php-client.
Thanks a lot