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:

File nameResult
success.jpgReturns a successful mock response
fail.jpgReturns a mock response with a random document processing error

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:

Area codeResult
888Returns a successful mock response
999Returns a failure mock response with a random telecom error

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 999 to the SMS Possession Send endpoint. The last four digits should be the error code to trigger. For example, pass 9995553104 to simulate error 3104 (max retries exceeded).
  • Simulating success on Confirm: Pass any valid phone number that does not begin with 999 to the Send endpoint, then submit code 123123 to the Confirm endpoint.
  • Simulating multiple failures on Confirm: Submit any code other than 123123 to the Confirm endpoint.