Google api refresh_token null and how to refresh access token
The refresh_token is only returned on the first request. When you refresh the access token a second time it returns everything except the refresh_token and the file_put_contents removes the refresh_token when this happens the second time. Modifying the code as following will merge in the original access token with the new one (see: array_merge). This … Read more