Ferli fyrir auðkenningu með skilríkjum á farsíma í Dokobit Identity API

Please be aware that access_token parameter must be sent with every request. 

Successful authentication process requires to use only two endpoints:
1. /v2/mobile/login.json (for initializating authentication process)
2. /v2/mobile/login/status/{token}.json (for checking authentication status)

1.   /v2/mobile/login.json 

First of all, you have to make POST request to "/v2/mobile/login.json" with two required params - phone number and personal code.
 REQUEST  URL: https://developers.dokobit.com/v2/mobile/login.json?access_token=YOUR_ACCESS_TOKEN  METHOD: POST  BODY: phone=+37060000666&code=50001018865   RESPONSE  {      "status": "ok",      "token": "AUTHENTICATION_TOKEN",      "control_code": "4231",      "name": "MARY ÄNN",      "surname": "O’CONNEŽ-ŠUSLIK TESTNUMBER",      "code": "50001018865",      "country": "LT",      "certificate": {...}  }  or  {      "status": "error",      "message": "Not a mobile signature user",      "error_code": 6001  }
After receiving this response, make sure to display "control_code" for the user because they need to verify that this control code is the same as they see one in their mobile device.
2.   /v2/mobile/login/status/{token}.json 

Now you need to start checking status of authentication process by making GET request to "/v2/mobile/login/status/AUTHENTICATION_TOKEN.json". You should do it every 3 seconds until other than {"status":"waiting"} response is returned and not longer than 100 seconds.
 REQUEST  URL: https://developers.dokobit.com/v2/mobile/login/status/AUTHENTICATION_TOKEN.json?access_token=YOUR_ACCESS_TOKEN  METHOD: GET  RESPONSE   {      "status": "ok"  }  or  {      "status": "waiting"  }  or  {      "status": "error",      "message": "Sending request to phone failed",      "error_code": 7022  }
When you receive a successful response with status "ok", authentication process is finished and you can authorize user by using their personal code and country received in first request.
If in any step you received a response with status different than "waiting", you need to stop requesting status of that session and inform user with error message. 
If you need to translate errors to other languages, please use error_code value from response (error codes with their meanings can be found here).

After successful integration, you can test authentication scenarios with the data here.

Þarftu frekari aðstoð? Hafðu samband Hafðu samband