I'm trying to use the subscriptions endpoint for resource /me/messages. But getting 400 . Can someone please help me to figure out what am i doing wrong ??
Below are the details:
CODE:
const options = {
authProvider,
};
const client = Client.init(options);
const subscription = {changeType: 'updated',notificationUrl: 'https://<domain-name>/flows/ae176be5-72db-4a3a-a2b1-efaa0b8fbd4d/components/ba8b7727-ebb8-4d37-873d-f8bad09058a5',resource: '/me/messages',expirationDateTime: '2021-06-02T10:40:57.553Z',clientState: 'ba8b7727-ebb8-4d37-873d-f8bad09058a5'};
await client.api('/subscriptions')
.post(subscription);