最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

spring - Why is Graph MS API randomly returning 401 upon subscription creation? - Stack Overflow

programmeradmin0浏览0评论

I'm trying to subscribe to OneDrive changes by sending a POST request to .0/subscriptions in Spring with the following body:

            {
                "changeType": "updated",
                "notificationUrl": "%s",
                "resource": "/me/drive/root",
                "expirationDateTime": "%s"
            }

The problem is this sometimes returns a 401 unauthorized error, and at other times works fine. So I can't really tell what could be wrong given that this works sometimes or throws an error randomly. All my other API calls to list folders for example work fine with the same access token. Has anyone faced a similar issue ?

Tried to refresh the access token each time I call the subscription endpoint, and also tested my notification URL using Postman to check that it's working as intended.

发布评论

评论列表(0)

  1. 暂无评论