Created
May 21, 2018 05:00
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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