Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@botpress/messaging-client
Advanced tools
An http client to interact with the botpress Messaging Server
An HTTP client to make requests to the Botpress Messaging Server and receive webhook events using Express
Requires Node.js 16
yarn add @botpress/messaging-client
npm install @botpress/messaging-client
pnpm add @botpress/messaging-client
Initialize the client and respond to messages
// ensure your Express app has the json middleware
app.use(express.json())
// initialize client with your credentials
const client = new MessagingClient({
clientId: 'my-client-id',
clientToken: 'my-client-token',
webhookToken: 'my-webhook-token'
})
// listen for webhook events by providing an express router
client.setup(router)
// register callback method for incoming messages and respond to user
client.on('message', async (e) => {
await client.createMessage(e.conversationId, undefined, { text: `Hello I'm a bot!` })
})
The Messaging Server also produces these webhook events
client.on('user', async ({ userId }) => {
console.log(`new user: ${userId}!`)
})
client.on('started', async ({ userId, conversationId, channel }) => {
console.log(`new conversation started by ${userId} on ${channel} : ${conversationId}!`)
})
client.on('feedback', async ({ userId, conversationId, channel, messageId, feedback }) => {
console.log(
`feedback given by ${userId} on ${channel} in convo ${conversationId} on message ${messageId} : ${feedback}!`
)
})
FAQs
An http client to interact with the botpress Messaging Server
The npm package @botpress/messaging-client receives a total of 417 weekly downloads. As such, @botpress/messaging-client popularity was classified as not popular.
We found that @botpress/messaging-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.