使用Microsoft Graph API创建Bookings预约时遇502 BadGateway错误求助
使用Microsoft Graph API v1.0创建Microsoft Bookings预约时遭遇502 BadGateway(UnknownError)
调用POST https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{id}/appointments接口创建Bookings预约时,持续返回无有效提示的502错误,错误响应如下:
{ "message": "BadGateway", "innerError": { "error": { "code": "UnknownError", "message": "" } } }
已排查内容
- 确认访问令牌有效,且权限范围配置正确
- 核对过Booking企业ID、服务ID、员工ID均无误
- 最初使用Microsoft Docs提供的示例请求体发起请求,未成功
- 后来以通过Bookings前端手动创建的现有预约的GET请求返回JSON为模板构造请求体,仍然失败
- 同一访问令牌可正常调用取消、更新现有预约的Graph API接口
当前使用的请求体
POST https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/EXAMPLE@Example.com/appointments Content-type: application/json { "@odata.type": "#microsoft.graph.bookingAppointment", "customerName": "Filip", "customerEmailAddress": "example@g.com", "customerTimeZone": "Eastern Standard Time", "serviceId": "XYZ", "startDateTime": { "dateTime": "2025-06-14T13:00:00Z", "timeZone": "UTC" }, "endDateTime": { "dateTime": "2025-06-14T14:00:00Z", "timeZone": "UTC" }, "staffMemberIds": [ "XYZ" ] }
有没有人遇到过类似的创建预约时的502 UnknownError问题?能否分享一个可成功执行的POST请求体示例?
内容的提问来源于stack exchange,提问作者Filip
相关产品推荐
相关产品推荐

