> 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.

# PHP

> Learn more about integrating using PHP

Version 1.0

Released March 25, 2022

\
\


View changelog

View on Github

This is a sample seed PHP Web App integrated with ID.me via OAuth 2.0

> **Note**
>
> You will need an [ID.me developer account](https://api.id.me/en/registration/new) to complete this process

## Prerequisites

You must have `composer` and `php` installed

## Installation

Download the [code](https://github.com/IDme/PHP-sample-code)

Adjust your client configuration settings by adding the values provided in your [developer account](https://api.id.me/en/session/new)

```php
# .env file
CLIENT_ID=YOUR_CLIENT_ID
CLIENT_SECRET=YOUR_CLIENT_SECRET
REDIRECT_URI=http://localhost:3000/callback.php
AUTH_URL=https://api.id.me/oauth/authorize
TOKEN_URL=https://api.id.me/oauth/token
ATTRIBUTES_URL=https://api.id.me/api/public/v3/attributes.json
```

Run the following to install dependencies and start the server:

```bash
composer install
php -S localhost:3000
```

View the app at [http://localhost:3000](http://localhost:3000)