Get Sync Token

getSyncToken(p_companyID, p_adminUsername, p_adminPassword, p_userId, p_locationID)

 

You can use this endpoint to retrieve a token for user sync.

Parameters

Name Type Required Description
p_companyID string Yes The security code you have been provided with, string (32)
p_adminUsername string Yes The username of the I3 admin we need to login for one sync.
p_adminPassword string Yes The password of the I3 admin we need to login for one sync.
p_userId string Yes the user id in I3 which needs to be one synched.
p_locationID integer No The location id for which the sync will be made automatically.

Return values

ERROR_NO_SECURITY_HASH - p_companyId is not provided

ERROR_UNKNOWN_SECURITY_HASH - there is no company found based on the p_companyId provided

NO USERNAME PROVIDED - there is no p_adminUsername provided

NO PASSWORD PROVIDED - there is no p_adminPassword provided

NO USERID PROVIDED - there is no p_userId provided

NO ADMIN FOUND BASED ON USERNAME AND PASSWORD - there is no admin found based on the combination of p_adminUsername and p_adminPassword

NO USER FOUND BASED ON THE ID PROVIDED - there is no user found based on p_userId provided

In case all the data provided are correct we return a string which represents the token needed for one sync user.

Workflow

Step 1: the client will receive a token from ESWS with the above getSyncToken() call

Step 2: the client will access the url: https://i3.identysoft.com/users/oneSyncUserLogin/token - Please replace the token with the value received in Step 1

Note 1: when accessing the url from Step 2, in case there was a p_locationID supplied to the getSyncToken() call, the sync will start automatically. If there was no p_locationID supplied, then the user will need to manually select a location and press the synchronization button.

Note 2: The synchronization of the user is done through I3. The token received from ESWS is only used to auto login the administrator of I3, and to get the sync filters already in place.

Note 3: The PC/server on which the application of the 3rd party is running (and which calls the url from point 2) needs to be in the same network as the API Agent/API Server running PC/server. In case of companies using the EasyConnect cloud environment this is not a prerequisite.

Note 4: The url from point 2 needs to be called by the 3rd party in a web browser or in a web container.

Sample

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uen="uen:esws">
<soapenv:Header/>
<soapenv:Body>
<uen:Esws.getSyncToken soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<p_companyID xsi:type="xsd:string">^4p;tU0Q+#dEIhTWkuj5FnLD^aKWqVu0</p_companyID>
<p_adminUsername xsi:type="xsd:string">username</p_adminUsername>
<p_adminPassword xsi:type="xsd:string">password</p_adminPassword>
<p_userId xsi:type="xsd:string">5</p_userId>
<p_locationId xsi:type="xsd:string"></p_locationId>
</uen:Esws.getSyncToken>
</soapenv:Body>
</soapenv:Envelope>

Response

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:Esws.getSyncTokenResponse xmlns:ns1="uen:esws">
<return xsi:type="xsd:string">e4d8503e7d6df3b37dcaf5063576a11f795329f9a8d854d7372a730f6be1f22ee550baa52910777882b77352071f72c633339f527d7784a802a4a39f54f60c29</return>
</ns1:Esws.getSyncTokenResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>