Before starting to work with Wialon, it is necessary to login. Use the command core/login for this action:
svc=core/login¶ms={"user":<text>, "password":<text>, "operateAs":<text>}
After login session is created, you can execute some requests within it. If server haven't received any requests for 5 minutes the session will be killed. To prevent such behaviour you can send a request every 5 minutes, for example requests/avl_evts.
You can find an example of this request in the sample Login/logout.
If you got {error:7} in response please try special symbols percent-encoding (via %) for user
, password
and operateAs
. You may use any percent-encoding service (like this).
Name | Description |
---|---|
user | user name |
password | password |
operateAs | name of user from whose behalf you want to perform login (optional parameter) |
{ "eid":<text>, /* session ID */ "gis_sid":<text>, /* session ID for gis services */ "host":<text>, /* host */ "hw_gw_ip":<text>, /* hardware gateway ip */ "au":<text>, /* user name */ "pi":<int>, /* ping interval */ "tm":<uint>, /* current time (UTC) */ "wsdk_version":<text> /* sdk version */ "user":{ /* user from whose behalf you want to perform login */ "nm":<text>, /* name */ "cls":<uint>, /* ID of superclass "user" */ "id":<long>, /* ID */ "prp":{ /* custom properties, for example: */ "dst":<text>, /* daylight savings time */ "language":<text>, /* language (two-lettered code) */ "msakey":<text>, /* access key to mobile site */ "pcal":<text>, /* Iranian calendar */ "tz":<text>, /* time zone */ "us_units":<text>, /* US metrics (miles and gallons) */ ... }, "crt":<uint>, /* creator ID */ "bact":<uint>, /* account ID */ "fl":<uint>, /* user flags */ "hm":<text>, /* host mask */ "uacl":<uint>, /* user access to himself */ "mu": <uint>, /* Measurement system */ "ct": <uint>, /* User creation date */ "ftp": {<text>}, /* FTP settings */ "ld": <uint>, /* Last login date */ "pfl": <uint>, /* Creators flag */ "ap": { /* Two-factor authentication settings */ "type":<uint>, /* authentication type ( 0 - none, 1 - email, 2 - SMS ) */ "phone":<text> /* Phone number */ }, "mapps": {<text>}, /* Mobile apps list */ "mappsmax": <int> /* Restrictions on mobile applications specified in the billing plan */ }, "classes":{ /* superclasses available for current user (key - superclass name, value - superclass ID): */ "avl_hw":<uint>, /* hardware type */ "avl_resource":<uint>, /* resource */ "avl_retranslator":<uint>, /* retranslator */ "avl_unit":<uint>, /* unit */ "avl_unit_group":<uint>, /* unit group */ "user":<uint>, /* user */ "avl_route":<uint> /* route */ } "features":{ "unlim":<bool>, /* billing plan type: 0 - regular, 1 - special (for development/testing) */ "svcs":{ /* hash-collection of allwed services, if service not mentioned here means it is forbidden */ "<service_name>":<bool>, /* key - service name, value: 0 - service available, but limit reached, 1 - service available and can be used */ ... } } }
Clarification for <service_name>: for additional info please refer to services list.
User flags are described in the chapter Set user settings flags.
More about FTP setting here - Custom FTP settings.
Code | Value |
---|---|
6 | Storage server unavailable |
Other errors may also occur.
|