Get refresh token google api
I can't get my refresh token with my code. I can only get my access token, token type etc., I have followed some tutorials like putting access_type=offline on my login URL: echo "<a href='https://accounts.google.com/o/oauth2/auth?" . "access_type=offline&client_id=123345555.apps.googleusercontent.com& " . "scope=https://www.googleapis.com/auth/calendar+https://www.googleapis.com/auth/plus.me&response_type=code& " . "redirect_uri=http://www.sample.com/sample.php&state=/profile'>Google</a>"; and my fields in getting the access token: $fields=array( 'code'=> urlencode($authcode), 'client_id'=>