I have been trying to implement an app that would need user to grant access to Google Analytics. I have been following this tutorial:
https://developers.google.com/analytics/solutions/articles/hello-analytics-api
And at some other places there is code for AngularJs which uses the same functionL
https://gist.github.com/jakemmarsh/5809963
My problem is, that the auth works pretty well, but it does not return a refresh_token. It never returns a refresh_token. I have tried all the possible available on the web. 1. The first time, 2. Using prompt=force etc etc.. But nothing seems to return the refresh_token. I guess that part is skipped by the client or something.
I need to know how can I get the refresh_token when the user grants access for the first time so that I can save it.