I am trying get refresh token. I read about it in google documents. Now, I am using accesstype offline and also approval_prompt: "force" But I am not getting refresh token in response. I not getting what I am doing wrong.
I have following html code:
<input type="submit" class="btn btn-info" value="Google" onclick="authorizeWithGoogle()" />
Javascript code:
 var cid = 'XXXXX';
 var apik = 'XXXXX';
 var scopes = 'https://www.google.com/m8/feeds';
 function authorizeWithGoogle() {
     gapi.client.setApiKey(apik); 
     gapi.auth.authorize({ client_id: cid, scope: scopes,  accesstype: "offline"   ,approval_prompt: "force"}, handleAuthResult);
 }
 function handleAuthResult(authResult) {
     delete authResult['g-oauth-window'];
 if (authResult && !authResult.error) {
    console.log(JSON.stringify(authResult));      
 }
}
Can you please help me.
 
     
    