1.0.1 โ€ข Published 6 years ago

messagemedia-lookups-sdk v1.0.1

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
6 years ago

MessageMedia Lookups NodeJS SDK

The MessageMedia Lookups API provides a number of endpoints for validating the phone numbers youโ€™re sending to by checking their validity, type and carrier records.

โญ๏ธ Installing via NPM

Now install messagemedia-messages-sdk via npm by using:

  • npm install messagemedia-lookups-sdk

Alternatively, add the following to the dependencies section of your package.json:

  • "messagemedia-lookups-sdk": "^1.0.0"

๐ŸŽฌ Get Started

It's easy to get started. Simply enter the API Key and secret you obtained from the MessageMedia Developers Portal into the code snippet below and a mobile number you wish to send to.

๐Ÿ‘€ Lookup a number

const sdk = require('messagemedia-lookups-sdk');

// Configuration parameters and credentials
lib.Configuration.basicAuthUserName = "YOUR_API_KEY"; // The username to use with basic authentication
lib.Configuration.basicAuthPassword = "YOUR_API_SECRET"; // The password to use with basic authentication

var controller = lib.LookupsController;

var phoneNumber = "YOUR_MOBILE_NUMBER";
var options = 'carrier,type';

controller.getLookupAPhoneNumber(phoneNumber, options, function(error, response, context) {
  console.log(response)
});

๐Ÿ“• Documentation

The NodeJS SDK Documentation can be viewed here

๐Ÿ˜• Got Stuck?

Please contact developer support at developers@messagemedia.com or check out the developer portal at developers.messagemedia.com