I kept receiving tokens such as:
when making calls to google api, even though I was doing the call like this:
As it turns out, you only get the refresh_token on the first authorization, so you should save it then. To address this, go to google apps, and revoke the app’s access to your API ( calendar in my case ), and go through the authorization flow again.
This time you’ll receive a refresh_token as well.