Discussions

Ask a Question
Back to All

UpdateEvent API end point not working

Here is our sample code
$data = array('event_id'=>'121429','data'=>array('id'=>'121429','name'=>'test'));
$client = new \GuzzleHttp\Client();
$settings = parse_ini_file($_SERVER["DOCUMENT_ROOT"]."/config.ini");
try {
$response = $client->request('PUT', 'https://api.boomset.com/events/'.$data['event_id'], [
'body' => json_encode($data['body']),
'headers' => [
'accept' => 'application/json',
'content-type' => 'application/json',
'Authorization' =>'Token '.$settings['authorization']
]
]);
echo $response->getBody();
} catch (Exception $ex) {
echo json_encode($response);
}

We are getting a null response