Skip to content

Instantly share code, notes, and snippets.

@IbrahimTareq
Created May 21, 2018 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IbrahimTareq/44d246c9bf73a2e26138b2d7708eb625 to your computer and use it in GitHub Desktop.
Save IbrahimTareq/44d246c9bf73a2e26138b2d7708eb625 to your computer and use it in GitHub Desktop.
Code snippet on how to include the SDK and some general authentication and controller setup using the MessageMedia Webhooks Node.js SDK.
const lib = require('messagemedia-webhooks-sdk');
// Sets your auth credentials and creates controller which is used to call the createWebhook function from the SDK
function setup(){
var controller;
// Configuration parameters and credentials
lib.Configuration.basicAuthUserName = "API_KEY";
lib.Configuration.basicAuthPassword = "API_SECRET";
controller = lib.WebhooksController;
return controller;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment