Mock APIs and testing tokens
When implementing ID.me’s Services API, you can use mock APIs and test tokens to validate your integration before running transactions with live data.
Document mock APIs
Document endpoints accept form-data. You can control the mock response by naming your front_image file:
For Driver’s License and Passcard endpoints that require both front_image and back_image, the name of the back_image file is irrelevant and can be anything.
You can request a set of test images for Driver’s Licenses, Passports, and Passcards that are pre-named to trigger these mock responses. Contact your ID.me account manager to request them.
Telecom mock APIs
Telecom endpoints accept a phone parameter. The area code of the phone number controls the mock behavior:
To trigger a specific error code with a 999 area code, set the last four digits of the phone number to the error code you want to simulate. For example, to trigger error 1008 (phone number flagged for fraudulent activity), pass the phone number 9995551008.
SMS possession mock behavior
The SMS Possession endpoints work slightly differently from other telecom endpoints:
- Simulating failure on Send: Pass a phone number with area code
999to the SMS Possession Send endpoint. The last four digits should be the error code to trigger. For example, pass9995553104to simulate error3104(max retries exceeded). - Simulating success on Confirm: Pass any valid phone number that does not begin with
999to the Send endpoint, then submit code123123to the Confirm endpoint. - Simulating multiple failures on Confirm: Submit any code other than
123123to the Confirm endpoint.