const Webex = require(`webex`); const webex = Webex.init({ credentials: { access_token: } }); // Create a room with the title "My First Room" // Add Alice and Bob to the room // Send a **Hi Everyone** message to the room webex.rooms.create({ title: `My First Room` }).then(room => { return Promise.all([ webex.memberships.create({ roomId: room.id, personEmail: `alice@example.com` }), webex.memberships.create({ roomId: room.id, personEmail: `bob@example.com` }) ]).then(() => webex.messages.create({ markdown: `**Hi Everyone**`, roomId: room.id }) ); });

Comments