failed: Error during WebSocket handshake: Unexpected response code: 400

xu shunhai 1 Reputation point
2021-07-30T07:08:02.467+00:00

when I use Teams api /me/drive/root/subscriptions/socketIo
and follow the sample
// this is the notificationUrl returned from this API
var notificationUrl = "https://f3hb0mpua.svc.ms/zbaehwg/callback?snthgk=1ff3-2345672zz831837523";

// 'io' comes from the socket.io client library
var socket = io(notificationUrl);

// these examples log to the console.
// your app would provide its own callbacks
socket.on("connect", ()=>console.log("Connected!"));
socket.on("notification", (data)=>console.log("Notification!", data));

it returned error failed: Error during WebSocket handshake: Unexpected response code: 400

Microsoft 365 Publishing
Microsoft 365 Publishing
Microsoft 365: Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line. Publishing: The process of preparing, producing, and releasing content for distribution or sale.
603 questions
0 comments No comments
{count} votes