use_auth_hash

The use_auth_hash function can be used together with the create_auth_hash instead of the duplicate function. In the authHash field, enter the result of the create_auth_hash request.

Copied!
svc=core/use_auth_hash&params={"authHash":"<text>",
                               "operateAs":"<text>",
                               "checkService":"<text>"}

Parameters

NameDescription

authHash

The authorization hash that you can get using the create_auth_hash request.

operateAs

The name of the subordinate user on whose behalf you want to log in.

checkService

You can check using the get_account_data (see the Service list section).

Returned result

Copied!
{
	"eid":"<text>",			/* session ID */
	"gis_sid":"<text>",		/* session ID for the GIS services */
	"host":"<text>",			/* host */
	"hw_gw_ip":"<text>",		/* hardware gateway IP */
	"au":"<text>",			/* username */
	"hl":<int>,				/* have login ID. True if the field is present (the value always 1) */
	"tm":<uint>,			/* current time (UTC) */
    "wsdk_version":"<text>",  /* SDK version */
	"base_url":"<text>",
	"hw_gw_ip":"<text>",      /* hardware gateway IP */
	"hw_gw_dns":"<text>",     /* hardware gateway DNS */
	"gis_search":"<text>",	/* GIS search URL */
	"gis_render":"<text>",    /* GIS render URL */ 
	"gis_geocode":"<text>",   /* GIS geocode URL */ 
	"gis_routing":"<text>",   /* GIS routing URL */ 
	"token":"<text>",         /* session token */
	"th":"<text>",            /* token hash */
	"web_site":"<text>",      /* URL of the Wialon Monitoring system */
	"web_cms_manager_site":"<text>"		/* URL of the Wialon Management system */
	"user":{			/* the user on whose behalf you want to log in */
		"nm":"<text>",			/* name  */
		"cls":<uint>,			/* the ID of the superclass "user" */
		"id":<long>,			/* ID */
		"prp":{				/* custom properties, for example: */
			"dst":"<text>",			/* daylight saving time */
			"language":"<text>",		/* language (two-lettered code) */
			"msakey":"<text>",		/* access key to the 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>,			/* the date of user creation */
		"ftp": {"<text>"},		/* FTP server settings */
		"ld": <uint>,			/* the date of the previous login */
		"pfl": <uint>,			/* the flag of the creator */
		"ap": {				/* two-factor authentication settings */
		    "type":<uint>,		/* authentication type (0 — none, 1 — email, 2 — SMS) */
		    "phone":"<text>"		/* phone number */
		},    
		"mapps": {"<text>"},		/* the list of mobile apps */
		"mappsmax": <int>		/* the restrictions for the mobile applications specified in the billing plan */
	},
	"classes":{			/* the superclasses available to the 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 allowed services; if a service isn't mentioned here, it is forbidden */
			"<service_name>":<bool>,	/* key — service name; value: 0 — service available, but limit reached, 1 — service available and can be used */
			...
		}
	}
}

The user flags are described on the update_user_flags page.

See more about the FTP settings on the update_ftp_property page.

Possible error codes:

CodeDescription
1003See the reason field for details.
8Login failed.
7Access denied.
4Wrong input parameters.
Download PDF file
Download Word document

See also