I want to get the access token from Google. The Google API says that to get the access token, send the code and other parameters to token generating page, and the response
This has caused me some confusion so I thought I'd share what I've come to learn the hard way:
When you request access using the access_type=offline
and approval_prompt=force
parameters you should receive both an access token and a refresh token. The access token expires soon after you receive it and you will need to refresh it.
You correctly made the request to get a new access token and received the response that has your new access token. I was also confused by the fact that I didn't get a new refresh token. However, this is how it is meant to be since you can use the same refresh token over and over again.
I think some of the other answers assume that you wanted to get yourself a new refresh token for some reason and sugggested that you re-authorize the user but in actual fact, you don't need to since the refresh token you have will work until revoked by the user.