player_id; $heading = $request->heading; $message = $request->content; $client = new \GuzzleHttp\Client(); $response = $client->request('POST', 'https://onesignal.com/api/v1/notifications?app_id=1be4b99b-8faa-45b8-ad82-c66225d77bf4', [ 'body' => '{"include_player_ids":["'.$player_id.'"],"headings":{"en":"'.$heading.'"},"contents":{"en":"'.$message.'"},"name":"INTERNAL_CAMPAIGN_NAME"}', 'headers' => [ 'Authorization' => 'Basic MWM2NGEyODUtN2U5MS00MzlkLWJhYmItZGUyODRjYTlmNGJm', 'accept' => 'application/json', 'content-type' => 'application/json', ], ]); $resBody = $response->getBody(); return $resBody; } }