Name.ai developer portal / Authentication
Authentication to the Name.ai API and MCP server is optional. Every read endpoint — domain search, WHOIS, TLD pricing and requirements — works with no account and no key. Completing the flow below unlocks one thing: real marketplace prices on domain search, where an anonymous caller sees them masked. The scheme is OAuth 2.1, authorization_code with PKCE (S256), public clients only. There is no API-key scheme.
Protected-resource metadata (RFC 9728) at /.well-known/oauth-protected-resource, authorization-server metadata (RFC 8414) at /.well-known/oauth-authorization-server. An unauthenticated call to https://thedomainnamesmarket.com/api answers 401 with WWW-Authenticate: Bearer resource_metadata="…", so one request is enough to find both.
Dynamic client registration (RFC 7591), no approval step: POST https://thedomainnamesmarket.com/api/oauth/register with {"redirect_uris": ["…"], "client_name": "…"}. Returns a client_id; no client secret is issued — every client is a public client.
Send the user to https://thedomainnamesmarket.com/oauth/authorize with response_type=code, your client_id and redirect_uri, a code_challenge (S256) and a random state. Codes are single-use and expire in 60 seconds.
POST https://thedomainnamesmarket.com/api/oauth/token with grant_type=authorization_code and your code_verifier. Returns an access_token (30 minutes), a refresh_token (30 days, rotates on every use) and the scope pricing:read.
Send Authorization: Bearer <access_token> on MCP tool calls to the Name.ai MCP server, or on POST https://thedomainnamesmarket.com/api/domain/search directly. Both then return real marketplace prices instead of masked ones.
This page is the readable twin of thedomainnamesmarket.com/auth.md, the canonical agent_auth document — fetch that one from an agent. Related: Name.ai API docs and the Name.ai MCP server.