A node.js wrapper for the MessageBird REST API
This repository contains the open source Node.js client for MessageBird's REST API. Documentation can be found at: https://www.messagebird.com/developers/nodejs
access_keyin the developers section
npm install messagebird
We have put some self-explanatory examples in the examples directory, but here is a quick breakdown on how it works.
Let's go ahead and initialize the library first. Don't forget to replace
<YOUR_ACCESS_KEY> with your actual access key.
var messagebird = require'messagebird''<YOUR_ACCESS_KEY>';
Nice! Now we can send API requests through node. Let's use getting your balance overview as an example:
// Get your balancemessagebirdbalancereadif errreturn console.logerr;console.logdata;;// Result object:payment: 'prepaid'type: 'credits'amount: 42.5
Or in case of an error:
Error: api errorerrors:code: 2description: 'Request not allowed (incorrect access_key)'parameter: 'access_key'
Complete documentation, instructions, and examples are available at: https://www.messagebird.com/developers/nodejs
The MessageBird REST API for Node.js is licensed under The BSD 2-Clause License. Copyright (c) 2014, MessageBird