【发布时间】:2016-11-30 05:28:29
【问题描述】:
根据 microsoft Document 我必须遵循以下步骤:
如果侦听器服务成功验证 URL,它会返回一个 5秒内成功响应如下:
- 将响应头中的内容类型设置为text\plain。
- 在响应正文中包含相同的验证令牌。
- 返回 HTTP 200 响应代码。侦听器可以随后丢弃验证令牌。
我的观点是这样的:
@app.route('/outlook/push', methods=['POST'])
def outlook_push():
return (request.args.get('validationtoken'), 200, {'Content-Type': 'plain/text'})
但这exceeds时间limit(5s)
我收到这样的错误:
{'error': {'code': 'ErrorInvalidParameter', 'message': "Notification URL 'https://5cbae04e.ngrok.io/outlook/push?validationtoken=NmIzZDJiMTMtZjhmNy00ZWMwLTg1MDctNDQwMDQ0OWM2NmE1' verification failed 'System.Net.WebException: The operation has timed out\r\n at System.Net.HttpWebRequest.GetResponse()\r\n at Microsoft.Exchange.OData.Model.Notifications.PushNotification.PushSubscriptionCallbackUrlValidationHelper.SendRequestAndVerifyResponse(Uri callbackUrl, PushSubscription pushSubscription)'."}}
有没有办法延长时间限制?
【问题讨论】:
标签: python flask outlook webhooks office365api