我正在尝试使用以下代码续订通知订阅。
$token = json_decode($account->token, true);
$newToken = json_decode($sync->refreshToken($token['refresh_token']), true);
$headers = array(
"Content-Type: application/json",
"Authorization: Bearer " . $newToken['access_token']
);
$url = "https://outlook.office.com/api/v2.0/me/subscriptions/" . $token['events_hookId'];
$res = $emailSync->runCurl($url, null, $headers, "PATCH");
print_r($res);
}
,但返回以下错误。
{“错误”:{“代码”:“ RequestBodyRead”,“消息”:“意外 从JSON阅读器读取时,发现“ EndOfInput”节点。一种 “ StartObject”节点原为 预期的。“}}