Socket
Socket
Sign inDemoInstall

botframework-connector

Package Overview
Dependencies
Maintainers
3
Versions
545
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botframework-connector

Bot Connector is autorest generated connector client.


Version published
Weekly downloads
110K
increased by4.21%
Maintainers
3
Weekly downloads
 
Created

What is botframework-connector?

The botframework-connector npm package is part of the Microsoft Bot Framework and is used to facilitate communication between bots and channels. It provides tools for authentication, sending and receiving messages, and managing conversations.

What are botframework-connector's main functionalities?

Authentication

This feature allows you to authenticate your bot with the Microsoft Bot Framework using your app ID and password.

const { MicrosoftAppCredentials } = require('botframework-connector');
const credentials = new MicrosoftAppCredentials(appId, appPassword);

Sending Messages

This feature allows your bot to send messages to a conversation. You need to provide the conversation ID and the message content.

const { ConnectorClient } = require('botframework-connector');
const client = new ConnectorClient(credentials, { baseUri: serviceUrl });
const message = { type: 'message', text: 'Hello, world!' };
await client.conversations.sendToConversation(conversationId, message);

Receiving Messages

This feature allows your bot to handle incoming messages. You can define how your bot should respond to different types of activities.

const { ActivityHandler } = require('botbuilder');
class MyBot extends ActivityHandler {
  constructor() {
    super();
    this.onMessage(async (context, next) => {
      await context.sendActivity('Message received');
      await next();
    });
  }
}

Managing Conversations

This feature allows your bot to create and manage conversations. You can specify the bot and user IDs to initiate a conversation.

const { ConnectorClient } = require('botframework-connector');
const client = new ConnectorClient(credentials, { baseUri: serviceUrl });
await client.conversations.createConversation({ bot: { id: botId }, members: [{ id: userId }] });

Other packages similar to botframework-connector

Keywords

FAQs

Package last updated on 15 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc