The super simple SendTab API allows developers to build SendTab functionality into third party applications. Send and receive tabs like a pro. SendTab uses a RESTful API style - to execute a command, simply load the appropriate URL. The command result will be returned as a JSON object.
SendTab API calls take the form:
All SendTab API calls require an authentication string. This string is an MD5 hash of the lowercased SendTab network name and network password.
// in PHP, generate the auth string like so:
$authstring = md5(strtolower($username) . $password);
Get a list of nodes in the SendTab network
To get a list of the existing nodes in a SendTab network, use thegetnames command. You must specify afrom parameter, which identifies the node from which the command is being issued. The node specified in the from parameter will NOT be included in the results. This command will return a JSON array of valid node names.
Add a new device to the network
New device nodes are created automatically upon their first login to a network. Thus, to create a new node, send it's name in the comp_name parameter along with a network name and password to the login endpoint.
http://sendtab.com/api3/login?name=My Network&password=My Password&comp_name=My New Device
Send a Tab
To send a tab, use the put command with the tab's URL as the link parameter, the name of the originating node as the from parameter, and a optionally the name of the recipient node as the to parameter.
Make sure to properly urlencode your link parameter.
Send a tab to one specific node:
Send a tab to all nodes in a network:
If the request was successful, the API will return a JSON object with the field status set to OK.
If for any reason the request fails, the API will return a JSON object with the field status set to FAIL.
Check for a new tab
To check if a new tab is waiting in the queue, use the get command, and pass in the current node's name in the from parameter.
If a tab is waiting, the API will return a JSON object where the field status contains the URL of the new tab.
If no tab is waiting, the API will return a JSON object where the field status is blank.