【发布时间】:2019-11-01 18:48:30
【问题描述】:
我们有一个留言簿,它使用 office 365 日历来管理通行证 (1-10),以及分配给谁的通行证和时间。
我们使用运行网页的平板电脑进行登录和注销。
到今天为止一切正常。
我们不再能够使用 php api 注销任何人。
我查看了 api 已知问题和新的发行说明,但在其中找不到任何内容。
我已尝试开启错误报告,但没有收到任何回复。
//update current event
error_reporting(E_ALL);
$curl = curl_init();
$endnow = date("Y-m-d\TH:i:s");
$timestamp = strtotime($endnow);
$time = $timestamp - (1 * 60 * 60);
$endnow = date("Y-m-d\TH:i:s", $time);
$test = "{\r\n\t\"end\": {\r\n\t\t\"dateTime\": \"" . $endnow . ".0000000\",\r\n\t\t\"timeZone\": \"UTC\"\r\n\t}\r\n}";
//echo $test;
$authurl = "https://graph.microsoft.com/beta/users/guest".$_POST['signoutnumber']."@trustsystems.co.uk/events/";
curl_setopt_array($curl, array(
CURLOPT_URL => $authurl.$id,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => $test,
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Authorization: Bearer " . $result->access_token,
"Cache-Control: no-cache",
"Connection: keep-alive",
"Content-Type: application/json",
"Host: graph.microsoft.com",
"accept-encoding: gzip, deflate",
"cache-control: no-cache",
"content-length: 86"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
这段代码应该做的是将点击的日历(在前一页上)的结束时间更新到现在。
据我所知,这并没有引发错误或实际上做任何事情。
上周成功了,谁能解释一下?
编辑:
我已经打印了回复,这就是我得到的:
{ "error": { "code": "ErrorPropertyValidationFailure", "message": "At least one property failed validation.", "innerError": { "request-id": "7cc59f12-8523-40d2-bef4-f1b0a09cea59", "date": "2019-10-31T10:11:21" } } }
也是昨天下午的一段时间,这随机又开始工作了。
【问题讨论】:
标签: php graph office365api