Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

MessageBird's REST API

Project description

MessageBird's REST API for Python

This repository contains the open source Python client for MessageBird's REST API. Documentation can be found at:

Build Status


  • Sign up for a free MessageBird account
  • Create a new access key in the developers sections
  • An application written in Python (tested with Python 2.7 and Python 3.4)


The easiest way to install the messagebird package is either via pip:

$ pip install messagebird

or manually by downloading the source and run the script:

$ python install


We have put some self-explanatory examples in the examples directory, but here is a quick example on how to get started. Assuming the installation was successful, you can import the messagebird package like this:

import messagebird

Then, create an instance of messagebird.Client:

client = messagebird.Client('test_gshuPaZoeEG6ovbc8M79w0QyM')

Now you can query the API for information or send a request. For example, if we want to request our balance information you'd do something like this:

  # Fetch the Balance object.
  balance = client.balance()

  # Print the object information.
  print('Your balance:\n')
  print('  amount  : %d' % balance.amount)
  print('  type    : %s' % balance.type)
  print('  payment : %s\n' % balance.payment)

except messagebird.client.ErrorException as e:

  for error in e.errors:
    print('  code        : %d' % error.code)
    print('  description : %s' % error.description)
    print('  parameter   : %s\n' % error.parameter)

This will give you something like:

$ python
Your balance:

  amount  : 9 
  type    : credits
  payment : prepaid

Please see the other examples for a complete overview of all the available API calls.


Complete documentation, instructions, and examples are available at:


The MessageBird REST Client for Python is licensed under The BSD 2-Clause License. Copyright (c) 2014, MessageBird

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for messagebird, version 1.4.1
Filename, size File type Python version Upload date Hashes
Filename, size messagebird-1.4.1-py2.py3-none-any.whl (16.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size messagebird-1.4.1.tar.gz (10.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page