· 7 years ago · Jul 18, 2018, 05:02 PM
1$client = new Client();
2 try{
3 $response = $client->request(
4 'POST',
5 "https://{$store}/admin/oauth/access_token",
6 [
7 'form_params' => [
8 'client_id' => $api_key,
9 'client_secret' => $secret_key,
10 'code' => $query['code']
11 ]
12 ]
13 );
14 }catch(Exception $e){
15 var_dump($e);
16 }