User Tools

Site Tools


APP Request / CHCK

The RESP command requests the webservice, through POST, retrieve the list of new messages.

By implementing an asynchronous communication process with webservice (POST), the device must send the CHCK command about each minute. The response from the CHCK command will return the list of new messages and the hash of the channels list.

If the channel list hash has been modified since the last check, the device must send the command LSUB to update the channel list of the local base. The hash obtained in the verification must be stored in the local base, so it could be compared to the hash obtained in the next requests, and thus keep the list of channels updated.

The channel list obtained in the webservice response includes the hash of each channel icon. If any hash is different from the local base, the APP should request the updated icon with the ICON command.

The messages have the sequence number attribute (Message-ID), which identifies each message in Followzup. The code of the last message received in the CHCK command must also be stored in the local base of the device, to be informed at the next check. If the device does not inform the Message-ID correctly, the device will receive messages previously sent.

POST variables

id Contains the identification of the Device, no encrypted (Device-ID)
key Contains the temporary AES key encrypted with the public key and encoded in Base64;
frame Contains the XML request, encrypted with the temporary AES key and encoded in Base64.

XML POST response

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"?>


  • retcode: Return code of the requested command represented by 4 numeric digits or “0” (zero) for successfully execution;
  • retframe: Contains the XML request response, encrypted with the temporary key AES and encoded in Base64. The XML request response depends on the command that was requested and the AES key used in its encryption is the same were used when the request was sent;
  • retmd5: Contains the MD5 hash of the retframe tag, to be validated by the requester.

XML request

<?xml version="1.0" encoding="utf-8"?>


  • stamp: Stamp code of the Interface.
  • resp: Must contain the literal “resp” (Channel Lookup);
  • sequence: Contains the request sequence number.
  • Message-ID: Message identification of the last message retrieved.

XML request response

<?xml version="1.0" encoding="utf-8"?>


  • md5-channel-list: Hash MD5 of the channels list;
  • channel-tag: Tag of the channel which has sent the message;
  • Message-ID: Message identification (numeric);
  • datetime: Data and time of the message (UTC), in the format “YYYY-MM-DD HH:MM:SS”;
  • msg-text: Message text (BASE64 format);
  • msg-url: Message URL (BASE64 format).

XML request response (invalid sequence):

<?xml version="1.0" encoding="utf-8"?>


  • Last-sequence: Sequence number used in the last request.

Return codes

0 Successfully execution
7101 Invalid sequence
7102 Invalid frame
7103 Invalid command
7104 Invalid Device-ID
7999 Webservice under maintenance

en-140-app-chck.txt · Last modified: 2017/05/30 12:31 by admin