Keesing Verification Services (KVS)
KVS stands for Keesing Verification Services, which designed as an API based system providing document verification services, to consume KVS you should be aware of the overal workflow of the system.
Description of different parts in the system
The APIs provided by Keesing Verification Services is hosted here and it serves document verification requests of the clients, Clients suppose to have valid credentials to interact with this API, for more information on the APIs please visit here.
How APIs work
Client of the API requests a verification service by providing the required data and an end-point (hosted in Proxy Server) to the APIs, the reason of providing end-point is to receive the results after processing at KVS via a web-hook call, we call this end-point.
To use KVS clients need to set up a simple and small web service refered as Proxy Server, the reasons for having this server are:
- Clients need to authenticate itself to use KVS services
- Clients will receive the results of verification requests by a webhook call, the reason is without webhook calls on proxy server we have to send the results to the devices or user interface of the client which is not good for several reasons.
So this Proxy Server designated to receive verification data from Client's own Mobile/Web app and send them to KVS and receive results back from KVS via webhook calls, then this web server may only have 3 Web APIs as follows:
- Web APIs to receive data from Mobile Apps and submit it to KVS.
- Web APIs to receive data from Web Apps submit it to KVS.
- Web API to receive the verification results from KVS known as WebHook.
The first two may Web APIs may even merge into one, the provided solution is just a suggestion and client can implement the proxy server by any other appraochs, the only things matter here are:
- The format and structure of the data send for verification which are JSON but with a signature mentioned in the Mobile SDKs code example and document.
- The signature and protocol of the WebHook service that receives the results mentioned here and it will be an array of objects (signature of the objects also exmplained in the same URL).
Authenticate Proxy Server to Connect to KVS and Consume the services
You need first to authenticate your application using your credentials in order to obtain an access token. You must send the provided client_id an d client_secret following the OAuth2 specification for "client_credentials" grant type.
POST https://api.authorization-server.com/token grant_type=client_credentials& scope=public_api& client_id=CLIENT_ID& client_secret=CLIENT_SECRET
You need to acquire CLIENT_ID and CLIENT_SECRET from Keesing.
Handling webhooks notifications
After sending all data to our API and starting the transaction, you should have a public and secure URL to receive events from our system. Our backend will POST data to your application and then you can react based on that results of the verification. The available webhooks are described in our API’s documentation.
As soon as you receive a
verification.complete event, you can retrieve the JSON results or a PDF report.
Mentioned SDKs and how to use them are explained in details in the links, the source code in the links are only code examples about how to exploit SDKs.