I want to get subscription data using Purchase.Subscription API. For this I am trying to get token from https://accounts.google.com/o/oauth2/token.
As per documentation ,It should return me following response:
{
"access_token" : "ya29.ZStBkRnGyZ2mUYOLgls7QVBxOg82XhBCFo8UIT5gM",
"token_type" : "Bearer",
"expires_in" : 3600,
"refresh_token" : "1/zaaHNytlC3SEBX7F2cfrHcqJEa3KoAHYeXES6nmho"
}
But when I tried to follow same steps, I am not getting refresh_token field in response. I am sending below fields as mentioned in documentation:
grant_type=authorization_code
code=<the code from the previous step>
client_id=<the client ID token created in the APIs Console>
client_secret=<the client secret corresponding to the client ID>
redirect_uri=<the URI registered with the client ID>
Please help me what I am missing.