By the development and donation of this web app, I hope to help other folks, through both example code and functionality, a head start on their own application to take advantage of OpenEMR API’s.
Feedback and improvements are greatly appreciated.
For convivence here is a download. Use repo for up to date code.
Unzip in openemr root:
oe-module-api-explorer.zip (32.8 KB)
example bookmark: https://localhost/openemr/modules/oe-module-api-explorer/oeApiExplorer.php?cleanSession
OpenEMR API Explorer - Installation Guide
Purpose
Educational reference implementation for developers building apps that integrate with OpenEMR’s OAuth2, FHIR, and Standard REST APIs.
Features
- FHIR and Standard API support
- OAuth2 client registration (JWT, Confidential, Public clients)
- Multiple grant type support (Authorization Code + PKCE, Client Credentials, JWT Bearer, Refresh Token)
- Interactive API explorer with browser-based UI
- Multi-site configuration support
- Automatic JWT key generation and JWKS setup
- Smart UI that syncs client and grant selections
- Scope-based resource population
- Token auto-refresh functionality
Requirements
- OpenEMR 7.02+
- PHP 8.1+ with OpenSSL extension
- SSL certificate (only required if using jwks_uri mode)
Installation Steps
- Clone or download the project to your OpenEMR modules directory
- Repo: GitHub - sjpadgett/oe-module-api-explorer
- Ensure the directory structure is
/openemr/modules/oe-module-api-explorer/or two levels above openemr root directory for pathing.
- Navigate to
/openemr/modules/oe-module-api-explorer/ - Edit
config.phpif needed (default localhost configuration works for most setups) - Access the explorer at
oeApiExplorer.php - Register clients from within the app(Register will create all(3) required client types and keys):
- Select desired API Site from dropdown
- Click “Register Clients” button
- Repeat for each site you want to use
Quick Start
- Open
oeApiExplorer.phpin your browser - Select API Site and click “Register Clients” (do this for each site you plan to use)
- Select client type, grant type, API type, and resource
- Click “Fetch” to test API calls
Configuration
- Edit
config.phpto add additional OpenEMR sites - Default supports localhost, docker, and remote demo sites
- JWKS can be served inline (default) or via file (requires SSL)
Key Files
client_register.php- Client and key registrationoeApiExplorer.php- Main browser interfaceoauth_client.php- OAuth2 flow handlersconfig.php- Environment configurationclients_keys/- Generated client credentials and keys
Links
- GitHub Repository: GitHub - sjpadgett/oe-module-api-explorer
- Author: Jerry Padgett (sjpadgett@gmail.com)
- License: Educational use, not an official OpenEMR product
Support
This is a community-contributed educational tool. For issues or contributions, use the GitHub repository.

