Skip to main content
Glama

get_auth_code

Retrieve or generate the EPP authorization code required to transfer a domain to another registrar. Optionally unlock the domain during the process.

Instructions

Get the transfer authorization (EPP) code for a domain. This code is needed to transfer the domain to another registrar. Can optionally generate a new code and unlock the domain for transfer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to get the auth code for
new_codeNoGenerate a new authorization code instead of returning the existing one
unlock_for_transferNoAutomatically unlock the domain for transfer when retrieving the code

Implementation Reference

  • The handler implementation for the 'get_auth_code' tool, which uses the DynadotClient to retrieve the authorization code.
    server.tool(
      "get_auth_code",
      "Get the transfer authorization (EPP) code for a domain. This code is " +
        "needed to transfer the domain to another registrar. Can optionally " +
        "generate a new code and unlock the domain for transfer.",
      {
        domain: z.string().describe("Domain name to get the auth code for"),
        new_code: z
          .boolean()
          .optional()
          .describe("Generate a new authorization code instead of returning the existing one"),
        unlock_for_transfer: z
          .boolean()
          .optional()
          .describe("Automatically unlock the domain for transfer when retrieving the code"),
      },
      async ({ domain, new_code, unlock_for_transfer }) => {
        try {
          const result = await client.getTransferAuthCode(domain, {
            newCode: new_code,
            unlockForTransfer: unlock_for_transfer,
          });
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(result, null, 2) },
            ],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return {
            content: [
              { type: "text" as const, text: `Failed to get auth code: ${msg}` },
            ],
            isError: true,
          };
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikusnuz/dynadot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server