User Tools

Site Tools


en-131-app-rdev


APP Request / Register

It requests the registration of new devices to the webservice, through POST.

When requesting the registration of a new device for registered users, Followzup creates the Device-ID and a pair of cryptographic keys (RSA) associated with the device. For anonymous users, Followzup also creates an anonymous User Code (User-ID).

Because the device does not yet exist, the request XML is encrypted with the APP (Interface-ID) public key, which is used only for new devices registrations.

Once registered, the APP receives the information of the new device (User-ID, Device-ID and RSA public key of the device), which must be stored in its local base. After registration, new requests must be encrypted with the public key of the device.



POST variables

id Contains the identification of the Interface (APP), no encrypted (Interface-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"?>
<followzup>
<retcode>return-code</retcode>
<retframe>xml-request-response</retframe>
<retmd5>md5-hash</retmd5>
</followzup>

where:

  • 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"?>
<followzup>
<stp>stamp</stp>
<eml>login</eml>
<pwd>password</pwd>
</followzup>

Where:

  • stamp: Stamp code of the Interface;
  • login: E-mail of the user or literal anonymous for unregistered users.
  • password: Password of the user or literal anonymous for unregistered users.



XML request response

<?xml version="1.0" encoding="utf-8"?>
<followzup>
<uid>User-ID</uid>
<did>Device-ID</did>
<pub>public-key</pub>
<mod>public-key-module</mod>
<pux>public-key-index</pux>
</followzup>

Where:

  • User-ID: User identification;
  • Device-ID: Device identification;
  • public-key: Public RSA key (BASE64 format).
  • public-key-module: Public RSA key module (BINARY format).
  • public-key-index: Public RSA key index (BINARY format).


Return codes

0 successfully execution
7102 Invalid frame
7104 Invalid Interface-ID
7105 Invalid Stamp code
7107 Invalid E-mail
7108 Invalid password
7999 Webservice under maintenance


en-131-app-rdev.txt · Last modified: 2017/05/30 09:46 by admin

Page Tools