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

I'm trying to subscribe to OneDrive changes by sending a POST request to .0subscriptions in Sprin

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745215428a4616989.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信