User
Authenticating, reading who the session belongs to, and ending it.
A user is an account on the Navixy platform. The operations here cover its life cycle at the edges an integration touches: turning credentials into a session, reading who that session belongs to and what their plan allows, and ending it.
Everything a user owns has its own page: settings, password, sessions, personal info, and the audit log. Sub-users are separate accounts under this one.
User object
Definitions the response refers to but does not repeat:
paas_settings- object. The same assettingsin thedealer/get_ui_configresponse.user_info.master- object. Returned only when the current user is a sub-user. Its fields mean the same as inuser_info, but describe the master account.features- string array. The features of the telematics service provider (TSP) account that are enabled.privileges.rights- string array. The rights granted to a sub-user, described in security group rights.user_menu- a menu preset. Itsaccount,main,applications, andfooter.itemsentries are menu item arrays.tariff_restrictions- the tariff restrictions object, whichuser/get_tariff_restrictionsalso returns on its own.hide_device_id- boolean.truewhen the web interface hides device IMEIs from this user. It resolves to the user's own value, or todefault_hide_device_idin the platform's service settings when the user has none of their own. A sub-user always gets the value of their master account.
API actions
API base path: /user.
Operations that list no errors of their own return only the general error codes.
Authenticating needs no session of its own, and is available at the UNAUTHORIZED access level.
When multi-factor authentication is enabled, the response carries type: "second_factor_required" and a hash usable only for the authentication code operations until a code is verified.
Exchange a login and password for a session hash. Requires no credential of its own, and accepts no existing session.
The returned hash is what the Authorization: NVX <hash> header carries on subsequent calls. An API key may be used instead of a session hash on most operations, but a small number accept a session hash only. See the operation descriptions.
User email as login, or a demo login.
User's password. 1 to 40 printable characters.
Optional. If specified, the API checks that the user belongs to this telematics service provider (TSP) account and returns error 102 if not.
A new session, or a challenge when a second factor is required
true if request finished successfully.
trueWhich outcome this is. authenticated means the session is ready to use. second_factor_required means multi-factor authentication is enabled and the returned hash is an MFA session, usable only for the user/auth/code/* operations until a code is verified.
Which second factor is in use. Present only when type is second_factor_required. Only email is available at the moment.
Session hash to send in the Authorization header. When type is second_factor_required it is an MFA session and is accepted only by the user/auth/code/* operations.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Access denied, error code 11, when the TSP account is blocked. Error codes 102 wrong login or password, 103 user not activated, 104 logins limit exceeded, and 105 login attempts limit exceeded return the default 400.
Error response object
POST /v2/user/auth HTTP/1.1
Host: api.eu.navixy.com
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"login": "text",
"password": "text",
"dealer_id": 1
}{
"success": true,
"type": "authenticated",
"factor_type": "email",
"hash": "text"
}Errors
These errors come in addition to the general error codes:
11 - Access denied, when the TSP account is blocked.
102 - Wrong login or password.
103 - User not activated.
104 - Logins limit exceeded. Reuse an existing session instead, see
user/session/renew.105 - Login attempts limit exceeded. Try again later.
Activation takes the session hash from the activation link emailed to the user, and works only for master users.
Activate the current user account.
Requires an activation session, so an ordinary session hash or API key cannot call this operation. Also requires the admin right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Account activated
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Operation not permitted, error code 13: the caller lacks the admin right.
Error response object
POST /v2/user/activate HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
"success": true
}Resending an activation link needs no session of its own, and is available at the UNAUTHORIZED access level.
Send the account activation email again.
Requires no credential. A session may be supplied and is used if valid, but is not required.
Also accepts GET with the same parameters as query-string values.
The account's login.
Activation email sent
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error code 265 already done, when the account is already activated and verified. Error code 264 timeout not reached, when the previous activation link was generated less than 5 minutes ago, or another server-configured timeout. The 264 body adds timeout and remainder, both ISO 8601 durations, giving the configured interval and the time left before the next attempt.
Error response object
POST /v2/user/resend_activation HTTP/1.1
Host: api.eu.navixy.com
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"login": "text"
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database, when no user has the given login.
209 - Failed sending email.
264 - Timeout not reached, when the previous activation link was generated less than 5 minutes ago, or within whatever timeout the server is configured with.
265 - Already done, when the account is already activated.
Return the current user, the platform settings that apply to them, their tariff restrictions, granted rights, enabled features, and menu.
Also accepts GET with the same parameters as query-string values.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Optional. If specified, the response includes a description of that application's custom menu.
Current user and platform information
true if request finished successfully.
trueIdentifier of the platform the user belongs to.
Names of features enabled for the user.
Deprecated menu structure. Null on current platforms.
Whether the premium GIS package is active.
Whether the web interface hides device IMEIs from this user. For a sub-user, the value of their master account.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/user/get_info HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 22
{
"application": "text"
}{
"success": true,
"paas_id": 1,
"paas_settings": {
"domain": "text",
"service_title": "text",
"locale": "text",
"currency": "text",
"maps": [
"text"
],
"has_https": true,
"allow_registration": true,
"gis_package": "text",
"password_policy": {
"min_length": 1,
"max_length": 1,
"special_chars": "text",
"min_special_chars_count": 1,
"min_digits_count": 1,
"min_uppercase_count": 1,
"min_lowercase_count": 1
},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"user_info": {
"id": 1,
"login": "text",
"title": "text",
"first_name": "text",
"middle_name": "text",
"last_name": "text",
"legal_name": "text",
"phone": "text",
"creation_date": "text",
"balance": 1,
"bonus": 1,
"locale": "text",
"demo": true,
"verified": true,
"phone_verified": true,
"legal_type": "legal_entity",
"default_geocoder": null,
"route_provider": null,
"time_zone": "text",
"measurement_system": "text",
"date_format": null,
"hour_mode": null,
"default_security_group_id": null,
"tin": "text",
"iec": "text",
"post_country": "text",
"post_region": "text",
"post_index": "text",
"post_city": "text",
"post_street_address": "text",
"registered_country": "text",
"registered_region": "text",
"registered_index": "text",
"registered_city": "text",
"registered_street_address": "text"
},
"tariff_restrictions": {
"allowed_maps": [
"text"
]
},
"privileges": {
"rights": [
"text"
]
},
"features": [
"text"
],
"menu": null,
"user_menu": {
"title": null,
"account": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"main": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"applications": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"footer": {
"title": null,
"items": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
},
"premium_gis": true,
"hide_device_id": true
}Return the restrictions the user's tariff imposes.
Requires a weblocator session. Also accepts GET with the same parameters as query-string values.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Tariff restrictions
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/user/get_tariff_restrictions HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
"success": true,
"value": {
"allowed_maps": [
"text"
]
}
}Logging out works only with a standard user session. Calling it with an API key returns error 4, "User or API key not found or session ended", even though the key itself is valid.
End the current session.
Requires a session hash. An API key is rejected with error code 4, "User or API key not found or session ended", which is misleading: the key is valid, but this operation accepts standard sessions only.
Also accepts GET with the same parameters as query-string values.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Session ended
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/user/logout HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
"success": true
}More in this section
User password
User personal info
Audit
User audit log
User authentication code
Session
Delivery session
Push token
Settings
User UI settings
User applications
Last updated
Was this helpful?