Hi
the following was working in V2023, now failing in 2024.
I have emailed 2fa email, does this cause a issue.
I can get the token ok
put when i try and do a post, response is null
$url = "https://xxxx.net/api/";
$ch2 = curl_init();
$data = array(
"method" => 'post',
"reference" => rand(5, 15),
"formdata" => json_encode($details),
);
curl_setopt($ch2, CURLOPT_URL, $url . 'add/tablename');
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch2, CURLOPT_POST, 1);
curl_setopt($ch2, CURLOPT_POSTFIELDS, json_encode($data));
$headers = array();
$headers[] = 'X-Authorization: '.$token['JWT'];
$headers[] = 'Content-Type: application/json';
curl_setopt($ch2, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch2);
$errNo = curl_errno($ch2);
if ($errNo !== 0) {
throw new NetworkException(curl_error($ch2), $errNo);
}
// check HTTP status code
$http_code = curl_getinfo($ch2, CURLINFO_HTTP_CODE);
curl_close($ch2);
$res = json_decode($result);
any ideas?
thanks