Skip to main content

Authentication Services

Customer Token Verification Service (API)#

For the token verification service, a rest api service is expected to be implemented and openned to us in your own system.

Request URI#

https://<YOUR-API-ENDPOINT>/checkauthtoken

Request Method#

POST

Request#

Sample Request

{
"deviceId" : "<unique device id that dlgToken created for>",
"dlgToken" : "<authorization token to verify>",
"customerNo" : "<customer no that dlgToken created for>",
"deviceHash" : "<Unique device hash that is created in Diyalog system. For information only.>"
}

` Details of the fields in the above request are given below.

Field NameTypeDefinition
deviceIdStringUnique device id created for token validation. This id, token and customer number trio is the information required to validate the token. You are expected to generate a token for the deviceId and customerNo parameters in your system and check it according to these information.
dlgTokenStringToken that will be verified by your system.
customerNoStringCustomer number whose token will be verified for.
deviceHashStringIt is the unique deviceHash information created for the mobile device used by the customer in the Diyalog system. It is transmitted as information only in case you want to log it.

Response#

A string response is expected as a response. The expected string response values ​​and explanations are as follows.

Value (String)Definition
ValidatedToken is validated.
InvalidTokenToken is not valid.
ExpiredTokenToken is not validated due to expiration.
InvalidDeviceIdThe token is notverified because the device id is not correct.
InternalErrorThe token is not verified due to an unexpected error in your system.
BadRequestThe token is not verified due to an Diyalog api request is invalid.

All other responses will be considered token not verified.

Agent Token Verification Service (API)#

For the token verification service, a rest api service is expected to be implemented and openned to us in your own system. This API is required to ensure that the user is authenticated in the main application when the Diyalog is opened in an iframe.

Request URI#

https://<YOUR-API-ENDPOINT>/CheckToken

Request Method#

GET

Request#

Sample Request With Query Parameters

https://<YOUR-API-ENDPOINT>/CheckToken?sessionId=<sessionId>&token=<token>&userNo=<agent user id>

` Details of the fields in the above request are given below.

Field NameTypeDefinition
sessionIdStringUnique id that created for session in your agent application. You should create a token for Diyalog to verify this user id, session and token trio is valid.
tokenStringToken that will be verified by your system in order to be sure about the agent is authentication in the openned Diyalog app as iframe.
userNoStringAgent user id.

Response#

A following json object response is expected as a response.

{
"success" : true,
"errorMessage" : "Optional - Error message if success is false",
"result" : "Result detail message for log"
}