Setting the file. One moment.
Subchapter 133.7
examples/getting-started-pattern.mdMarkdown1 KBView on GitHub
This pattern shows a minimal Rivet bootstrap for Team Chat with OAuth installation support.
import { TeamChatClient } from "@zoom/rivet/teamchat";
(async () => {
const teamchatClient = new TeamChatClient({
clientId: process.env.RIVET_CLIENT_ID,
clientSecret: process.env.RIVET_CLIENT_SECRET,
webhooksSecretToken: process.env.RIVET_WEBHOOK_SECRET_TOKEN,
installerOptions: {
redirectUri: process.env.RIVET_REDIRECT_URI,
stateStore: process.env.RIVET_STATE_STORE_SECRET,
},
port: Number(process.env.RIVET_PORT || 8080),
});
teamchatClient.webEventConsumer.event("chat_message.sent", ({ payload }) => {
console.log("event", payload);
});
const server = await teamchatClient.start();
console.log("rivet server", server.address());
})();/zoom/events suffix.installerOptions.redirectUri + callback path behavior.endpoints.* calls.Add API calls with typed wrappers:
const channels = await teamchatClient.endpoints.chatChannels.listUsersChannels({
path: { userId: "me" },
});