/smooch-api-quickstart-example

Sample code to get started with the Smooch REST APIs

Primary LanguageJavaScript

Smooch API Examples

Get started

For a detailed guide, see the Smooch API Quickstart and our API QuickStart video tutorial:

VIMEO

Node.js

  1. Clone the repository
  2. Go to the nodejs subdirectory
  3. Update index.js to include your secret key and key ID from your Smooch settings Smooch App settings Smooch Create new secret key
  4. Install dependencies (npm install)
  5. Run the server (node index)
  6. Use ngrok to create a secure tunnel to port 8000(ngrok http 8000 after ngrok is installed on your PC)
  7. Create a Facebook page and connect it to Smooch
  8. Create a Webhook from your dashboard and point it at the full url for the /messages endpoint (e.g. https://MY-NGROK-DOMAIN.ngrok.io/messages )
  9. Send messages to your Facebook page and watch the auto-replies roll in

Python

  1. Fork the Smooch API Examples repository
  2. Write an example in Python
  3. Make a PR