This topic describes the communication protocol between APPs and the webservice Followzup, to be used as a reference for the development of APPs for different types of mobile devices.
Whatever language is used, it must have the AES and RSA encryption libraries compatible with PHP, used in the development of the webservice, witch handles the requests of the mobile devices.
All communication between mobile devices APP and the webservice is performed through POST. For mobile devices requests, the POST destination URL is “http:
The APP should define the following POST variables:
|id||Contains the identification of the requester, with no encryption (Device-ID), or the identification of the interface for new devices registration, with no encryption (Interface-ID);|
|key||Contains the temporary AES key encrypted with the public key of the device (or interface for new device registration), encoded in Base64;|
|frame||Contains the XML request, encrypted with the temporary AES key and encoded in Base64.|
In response to the POST, the webservice returns the XML POST response, which should not mistaken with the XML request response, as described below. The POST response XML includes 3 tags:
<?xml version="1.0" encoding="utf-8"?> <followzup> <retcode>return-code</retcode> <retframe>xml-request-response</retframe> <retmd5>md5-hash</retmd5> </followzup>
The XML request sent to the webservice contains the parameters needed to execute the command.
In addition to the command to be executed and the parameters required for its execution, the XML request must include the request sequence, which corresponds to an integer starting from 1 at the device registration. After a request with sequence N, the next request must have the sequence N + 1.
IMPORTANT: In the initial registration of the device it is not necessary to enter the sequence number of the request, since the device has not yet been registered.
XML request response format (invalid sequence):
<?xml version="1.0" encoding="utf-8"?> <followzup> <seq>Last-sequence</seq> </followzup>
Here are the available commands for sending requests from mobile devices:
All requests forwarded to the webservice must contain the Stamp code of the Interface. The Stamp code is a 128-byte string randomly generated by Followzup when a new Interface is created.
Each Interface record is associated with an APP, and the inclusion of new Interfaces can only be performed by the Followzup administrator.
To create a new APP, the developer must request the registration of the new Interface to the Followzup administrator. After inclusion, the developer will receive the new interface code (Interface-ID), the Stamp code and the RSA public key of the Interface for registering new devices.
The informations stored on the device's local base are:
Subscribed channels list:
Search channels list:
Channels icon list:
The following is the APP operating flow, indicating where each command is executed.