> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.id.me/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.id.me/_mcp/server.

# Mock APIs and testing tokens

> Test your Services API integration using mock APIs and testing tokens before going live with real data.

When implementing IDMe'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 name     | Result                                                          |
| ------------- | --------------------------------------------------------------- |
| `success.jpg` | Returns a successful mock response                              |
| `fail.jpg`    | Returns 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.

> **Info**
>
> 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 IDMe 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 code | Result                                                      |
| --------- | ----------------------------------------------------------- |
| `888`     | Returns a successful mock response                          |
| `999`     | Returns 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.