I am trying to renew notification subscription using below code.
$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);
}
but its returning below error.
{"error":{"code":"RequestBodyRead","message":"An unexpected 'EndOfInput' node was found when reading from the JSON reader. A 'StartObject' node was expected."}}