How to use the geo location Web APIs
Please note that these APIs are deprecated. Consider to use our new MyWakes geo location Web API REST
Attention! Apply for registration with the MyWakes services; you will receive the access key and service references.
The service is called by a post to the: “cloudcommand” page with the following parameters:
-
txtUser1. My Wakes account User Name.
-
txtUser2. My Wakes account Password.
-
txtCommand. Command to execute. Command details follow.
-
txtFormat. Optional field that specifies the format of the txtParameters field and the response format. It can be enhanced short or extended.
The short format can take the following values:
The extended format can take the following values:
-
00. Input XML - Output XML with CDATA
-
01. Input XML - Output XML with CDATA and indented
-
02. Input XML - Output XML without CDATA
-
03. Input XML - Output XML without CDATA and indented
-
04. Input XML - Output Json with cdata-section
-
05. Input XML - Output Json with cdata-section and indented
-
06. Input XML - Output Json without cdata-section
-
07. Input XML - Output Json without cdata-section and indented
-
10. Input Json - Output XML with CDATA
-
11. Input Json - Output XML with CDATA and indented
-
12. Input Json - Output XML without CDATA
-
13. Input Json - Output XML without CDATA and indented
-
14. Input Json - Output Json with cdata-section
-
15. Input Json - Output Json with cdata-section and indented
-
16. Input Json - Output Json without cdata-section
-
17. Input Json - Output Json without cdata-section and indented
-
txtParameter. Each command has its own unique parameters that are passed in XML/JSON. Command details follow.
-
txtProvider. Field containing the calling application’s ID and additional control characters for command validation.
- txtSignature. Field containing the digital signature.
The data must be sent using POST method.
The header must specify:
ContentType: application/x-www-form-urlencoded.
Signature calculation (txtSignature)
The txtSignature field must contain the HASH code calculated on a string of 32 characters comprising some of the parameters used for the command.
For example, in the case of a trackstart command, the string on which to calculate the signature might be: “trackstart20101112173025titolode”. This string has been obtained by including (command name) + (time) + (track title, compacting the spaces).
N.B. The parameters to use in constructing the calculation string are indicated in the description of each command.
Attention:
- the generated string must not have any spaces as these will need to be compacted
- should the generated string exceed 32 characters all extra characters must be eliminated from the calculation
- should the generated string be less than 32 characters long, random characters shall be added until the string reaches a length of 32 characters. In this case, the same characters added to the calculation string must also be added to the txtProvider field
You can see some examples of code for the signature calculation that have been developed in different languages.
Error message
In the event of an error you will receive the following structure:
Possible errors are:
-
Error1. txtProvider field incongruent.
-
Error2. User Name not set.
-
Error3. Invalid User Name and Password Pair.
-
Error4. txtCommand contains an unrecognised command.
-
Error5. Disabled interface type.
-
Error6. IP address does not meet IP restrictions policies.
-
Error7. Too many daily calls have been sent; it is necessary to wait for the next reset. The reset will take place at 00:00 UTC.
-
Other message containing a description of the error.