We also offer a sandbox environment where you can test our endpoints with the responses that may occur while using our Verification as a Service service.

The URL for the sandbox environment is https://api.cm.com/verification-service-sandbox/v1 followed by the service's endpoint. The authentication is the same as the regular services, for more information see Authentication.

To get started using the sandbox environment, request credentials through your account manager or support ([email protected]).

Create a verification

Creating a verification on the sandbox environment can be done on the same way as creating a transaction on the production environment. Make sure to use the correct URL, for more information see Verify a user

Request

URL

POST https://api.cm.com/verification-service-sandbox/v1/verify

Headers

Content-Type: application/json
Authorization: Bearer GENERATED_TOKEN_HERE

Body

{
  "phoneNumber": "+31612345678",
  "email": "[email protected]",
  "callbackUrl": "https://mycallbackurl",
  "excludeChannels": [
    "sms",
    "voice"
  ]
}

Response

{
  "id": "6f8d0a9d-b85c-4c3f-9e69-5699f1e00f49",
  "state": "pending",
  "type": "silent",
  "sessionUrl": "http://example.com/v1/dm/session/d635424bb0a54d388477cb17fa308655"
}

Update a verification

There are different verification codes that will result into a different state. Below is an overview of the codes that can be used to return the desired state.

Request

URL

PUT https://api.cm.com/verification-service-sandbox/v1/verify/{verificationId}

Headers

Content-Type: application/json
Authorization: Bearer GENERATED_TOKEN_HERE

Body

{
  "verificationCode": "999999"
}
verificationCodeReturned Status CodeState
000000200pending
111111200failed
222222200expired
999999200success

Response

{
  "id": "6f8d0a9d-b85c-4c3f-9e69-5699f1e00f49",
  "state": "success",
  "type": "smart"
}