response CurlRequest postRequest link env REPLUG_URL oauth token data

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
$response = CurlRequest::postRequest([
'link' => env('REPLUG_URL').'oauth/token',
'data' => [
'grant_type' => 'authorization_code',
'client_id' => env('REPLUG_CLIENT_ID'),
'client_secret' => env('REPLUG_CLIENT_SECRET'),
'redirect_uri' => env('REPLUG_CALLBACK_URL'),
'code' => $payload['code'],
],
]);