Subscription validation request timed out
Closed this issue · 5 comments
This is the ruby code I'm using to create a subscription in microsoft graph:
subscribe_endpoint = URI("https://graph.microsoft.com/v1.0/subscriptions")
http = Net::HTTP.new(subscribe_endpoint.host, subscribe_endpoint.port)
http.use_ssl = true
tomorrow = Date.today + 1
subscribe_request = "{
\"changeType\": \"created,updated\",
\"notificationUrl\": \"https://my_url/api/v1/outlook/o365notification\",
\"resource\": \"/users/#{params[:o365account_id]}/events?$filter=Extensions/any(f:f/id eq 'Microsoft.OutlookServices.OpenTypeExtension.meeteor_event')\",
\"expirationDateTime\": #{(Time.now + 1.day).to_json},
\"clientState\": \"SecretClientState\"
}"
subscribe_response = http.post(
"/v1.0/subscriptions",
subscribe_request,
'Authorization' => "Bearer #{params[:o365account_access_token]}",
'Content-Type' => 'application/json'
)
it worked great, but suddenly today I'm getting a Subscription validation request timed out
response. Altough when I'm doing a POST to https://my_url/api/v1/outlook/o365notification
it's just working fine.
Any ideas why it stopped working when nothing changed on my side?
Could it be that, because my_url
points on my dev environment and is often offline, the domain got banned?
Hi @alekkowalczyk . Since setting up my notification endpoint, I've only gotten that error when my service is offline (which also happens a lot). I just retested and I'm able to create a subscription.
Any chance your response time has slowed down?
I forwarded your question along to see if we can troubleshoot on this end.
Hi @DianeD thanks for the quick response.
I don't think the response time slowed down, when I do an POST call to the endpoint from Fiddler, the response is quick, it's a dev environment so it can take up to a half second but nowhere long enough to do an timeout if it's not set to extremely low values.
Tracking this issue on StackOverflow: http://stackoverflow.com/questions/41621627/microsoft-graph-webhook-subscription-validation-request-timed-out
Issue was resolved on StackOverflow:
"If anybody is interested: after our offline follow up it turned out that it's a connection issue, after my endpoint was deployed on a cloud service it worked. For endpoints pointing to dev machines ngrok is suggested."
Thanks for reporting, @alekkowalczyk !