Skip to main content

API 8: Private Redirect

Private redirection API

This API is required only for Type two integration where the results page exists on the client’s domain and contains sensitive information which requires private access using VeriDoc Global’s Two factor authentication check. By using this API, everytime a user scans the QR code (or visits the verification URL, client’s domain will call this API to check whether the presigned access token user is visiting, generated and authorised via VeriDoc Global or not.

ItemDescription
Provider Endpoint URIhttps://my.veridocglobal.com/api/privateredirecturl
Interface descriptionAllow to submit private documents
Mode of InterfaceRESTFUL API (JSON)
SecurityAuthorization Header: Access Key
Supports Multi-RecordsNo
Method(s)POST
Request Body Content-TypeApplication/JSON

Sample private-redirect request header:

Request Header

Content-Type: application/x-www-form-urlencoded
Content-Length: 0
apikey: < To enter API Key as provided by VeriDoc Global >
payload: < SHA256 HASH of APIKEYUNIQUEIDTOKENSECRETKEY) >

Sample private-redirect request body:

Request Body

{
"uniqueid": "Pass your verification page uniqueid here",
"token": "Pass token provided by VeriDoc as a query string in redirect url here",
}
Field NameDescriptionMandatory Comments
uniqueidThis will be uniqueid of results page user is trying to visit (GUID)Yes
tokenThis will be the token appended behind your verification URL yourtokenhereYesE.g.: If your redirect url is “https://yourdomain.com”, VeriDoc will provide a token as “https://yourdomain.com/GUID?veridoctoken=yourtokenhere”

Sample private-redirect response:

1. Success
{
"message": "Token matched",
"returncode": "1"
}
2. Uniqueid or token missing:
{
"message": "Please pass both uniqueid and token parameters.",
"returncode": "10"
}
3. Invalid token
{
"message": "Invalid token. Please try again.",
"returncode": "10"
}
4. Apikey or secretkey does not match the document
{
"message": "You are not authorized to perform this action.",
"returncode": "10"
}
5. Token expired (past the allowed time)
{
"message": "Access token expired. Please try again.",
"returncode": "10"
}
6. Passed wrong payload
{
"message": "Wrong Payload: Please check your payload and ensure that you are entering all parameters required to make payload string and converting it into a SHA256 unique hash value correctly.",
"returncode": "0"
}
7. Server problem
{
"message": "The request could not be processed. Please try again.",
"returncode": "4"
}
Please note: Rest cases will display the same message and return codes as other APIs.