1

I want to subscribe to calendar events and I am using the following API call

API call

and I am getting the following error

Subscription validation request failed. Notification endpoint must respond with 200 OK to validation request.

My code in calendar_notification (notificationUrl) has the functionality to send back 200 OK with validationToken. But while checking my server logs I realised that this API is not even hitting the notificationUrl. I have confirmed that notificationUrl is live and responds back if I hit the URL directly on the browser. Also, My app has the following permissions User permissions

I can call all the other types of APIs like me/calendar, create events or even GET subscriptions but can not use POST subscriptions API

Can someone tell me what am I missing and why am I getting this error?

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45

1 Answers1

0

There are a couple potential options here. Either your endpoint is not publicly accessible outside of your network, or your return value is incorrect/missing information.

There are multiple ways to validate if your endpoint is accessible outside your network.

This answer linked below provides good context for the content and formatting required on the response from the notificationURL:

Subscription validation request failed. Response must exactly match validationToken query parameter

Ric Lewis
  • 1
  • 2