View Categories

Authentication

5 Docs

Authentication Overview

Last Updated: March 31, 2026

DMSI Advanced API supports three authentication methods. All three use the standard HTTP Authorization: Bearer <token> header. The authentication middleware automatically detects the token type based on its format and routes validation accordingly. Authentication Methods Method Token Format Best For API Key dmsi_key_<40hex> Server-to-server integrations, long-lived credentials JWT Bearer Token Three dot-separated base64 segments Short-lived...

API Key Authentication

Last Updated: March 31, 2026

API Key authentication is the simplest method. Use it for server-to-server integrations where a long-lived credential is appropriate. Including the Key in a Request Primary method — Authorization header (recommended): curl https://yoursite.com/wp-json/dmsi-api/v1/licenses \ -H "Authorization: Bearer dmsi_key_<your-40-hex-chars>" Alternative method — X-API-Key header: curl https://yoursite.com/wp-json/dmsi-api/v1/licenses \ -H "X-API-Key: dmsi_key_<your-40-hex-chars>" Both headers are accepted. The Authorization: Bearer...

JWT Bearer Token Authentication

Last Updated: March 31, 2026

JWT authentication provides short-lived, stateless access tokens. Exchange an API key for a JWT token pair, then use the access token for subsequent requests. When the access token expires, use the refresh token to obtain a new pair without re-presenting the API key. Obtaining a JWT Token Pair Send a POST request to the token...

OAuth 2.0 Authentication

Last Updated: March 31, 2026

OAuth 2.0 is the appropriate authentication method when third-party applications need delegated access on behalf of a resource owner, or when client credentials-based machine-to-machine access is required. Supported Grant Types Grant Type Use Case Authorization Code (with PKCE) Web applications and mobile apps acting on behalf of a user Client Credentials Machine-to-machine access without a...

Sandbox Authentication

Last Updated: March 31, 2026

The sandbox environment uses a dedicated key type to ensure sandbox and production traffic are clearly separated. Sandbox Key Format dmsi_sand_<40 hex characters> Sandbox keys use the dmsi_sand_ prefix. The authentication middleware routes any token beginning with dmsi_sand_ to the sandbox key validation path before the regular API key check. Enabling Sandbox Mode and Obtaining...