name.ai

Name.ai developer portal / Authentication

Name.ai API 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.

  1. 1. Discover

    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://thenamesmarket.com/api answers 401 with WWW-Authenticate: Bearer resource_metadata="…", so one request is enough to find both.

  2. 2. Register

    Dynamic client registration (RFC 7591), no approval step: POST https://thenamesmarket.com/api/oauth/register with {"redirect_uris": ["…"], "client_name": "…"}. Returns a client_id; no client secret is issued — every client is a public client.

  3. 3. Authorize

    Send the user to https://thenamesmarket.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.

  4. 4. Exchange

    POST https://thenamesmarket.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.

  5. 5. Use it

    Send Authorization: Bearer <access_token> on MCP tool calls to the Name.ai MCP server, or on POST https://thenamesmarket.com/api/domain/search directly. Both then return real marketplace prices instead of masked ones.

The machine-readable version

This page is the readable twin of thenamesmarket.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.

Name.ai API Authentication — OAuth 2.1 with PKCE for Agents