duanqiang6501 2019-03-30 14:16
浏览 88

Outlook通知订阅续订PATCH

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."}}

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 画两个图 python或R
    • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
    • ¥15 八路抢答器设计出现故障
    • ¥15 请教一下c语言的代码里有一个地方不懂
    • ¥15 opencv 无法读取视频
    • ¥15 用matlab 实现通信仿真
    • ¥15 按键修改电子时钟,C51单片机
    • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
    • ¥20 5037端口被adb自己占了
    • ¥15 python:excel数据写入多个对应word文档