Posts

Showing posts with the label onedrive

OneDrive For Business - Received 400 Bad request error while creating Webhook subscriptions using OneDrive ReST API

OneDrive For Business - Received 400 Bad request error while creating Webhook subscriptions using OneDrive ReST API We were working on OneDrive webhooks subscription. We tried to create subscriptions and as per the API documentation, we were sending below payload POST https:///_api/v2.0/drive/root/subscriptions Content-type: application/json Headers: Authorization: Bearer Body { "changeType": "updated", "notificationUrl": "", "resource": "/me/drive/root", "expirationDateTime": "2018-01-01T11:23:00.000Z", "clientState": "client-specific string" } we are receiving 400 Bad Request with below response { "error": { "code": "invalidRequest", "message": "The request is malformed or incorrect." } } If we remove "changeType" and "resource" from payload, it works. Kindly suggest the proper way to ach...