$data = $guzzleClient->post(
'https://github.com/login/oauth/access_token',
[
'form_params' => [
'refresh_token' => $user->github_refresh_token,
'grant_type' => 'refresh_token',
'client_id' => config('services.github.client_id'),
'client_secret' => config('services.github.client_secret'),
]
]
);
Server error: `POST https://github.com/login/oauth/access_token` resulted in a `500 Internal Server Error`
$guzzleClient = new \GuzzleHttp\Client([
'headers' => [
'Content-Type' => 'application/json'
]
]);
$data = $guzzleClient->post(
'https://github.com/login/oauth/access_token',
[
'json' => [
'refresh_token' => $user->github_refresh_token,
'grant_type' => 'refresh_token',
'client_id' => config('services.github.client_id'),
'client_secret' => config('services.github.client_secret'),
],
'http_errors' => false
]
);