
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
serverless-facebook-messenger-bot
Advanced tools
Serverless backend for Facebook Messenger Bot
You need to have installed the Serverless Framework (version 0.5.2 or higher) and you're using Node.js v4.0+.
sls project install serverless-facebook-messenger-bot
Follow quickstart but start with Step 1 and Step 3 to get Page Access Token before deploying backend.
sls variables set -k PAGE_ACCESS_TOKEN
sls variables set -k VERIFY_TOKEN
VERIFY_TOKEN
is used for subsciption verification.
Deploy all functions and endpoints
sls function deploy --all
sls endpoint deploy --all
Now you have public webhook URL.
Back to the FB App Quickstart and verify your webhook.
curl -ik -X POST "https://graph.facebook.com/v2.6/me/subscribed_apps?access_token=<PAGE_ACCESS_TOKEN>"
Go to your Facebook Page and send a message to it. The response will come from your brand new servreless backend! See screenshots in the Quickstart
npm test
Want to add some logic into bot's responses? Take a look in functions/webhook/handlers/
sls function deploy --all
npm run offline
and you can send POST requests to http://localhost:3000/webhook
To get an idea about the POST body, enable logging:
sls variables set -k LOG_WEBHOOK_MESSAGES -v true
deploy, send few messages via Messenger and see the logs:
sls function logs webhook
FAQs
Serverless backend for Facebook Messenger Bot.
The npm package serverless-facebook-messenger-bot receives a total of 2 weekly downloads. As such, serverless-facebook-messenger-bot popularity was classified as not popular.
We found that serverless-facebook-messenger-bot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.