Token Based Authentication

Channel Token Based Authenticationprovides read and write access to a specific channel: the one the token is associated to.

Beebotte associates a Token to every created channel. This token can be used to authenticate read and write operations on that channel. Channel Token authentication uses either:

  • HTTP Authorization header
  • or, token query parameter

Token authentication using Authorization Header example:

POST /v1/data/write/demo/resource1 HTTP/1.1
Content-Type: application/json
Date: Mon, 07 Oct 2013 14:04:50 GMT
host: beebotte.com
X-Auth-Token: 1234567890

{"data":"37","ts":1400761008646}

Token authentication using token query parameter example:

POST /v1/data/write/demo/resource1?token=1234567890 HTTP/1.1
Content-Type: application/json
Date: Mon, 07 Oct 2013 14:04:50 GMT
host: beebotte.com

{"data":"37","ts":1400761008646}
//Include the Beebotte SDK for nodejs
var bbt = require('beebotte');

var bclient = new bbt.Connector({token: 'CHANNEL_TOKEN'});
//Include the Beebotte SDK for Python
from beebotte import *

bclient = BBT(token = "CHANNEL_TOKEN")