Get the auth code for a domain
GET
https://api.vercel.com/v1/registrar/domains/{domain}/auth-codeGet the auth code for a domain. This is required to transfer a domain from Vercel to another registrar.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.domainsRegistrar.getDomainAuthCode({ domain: "ruddy-coil.org", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", });
console.log(result);}
run();Response
{ "authCode": "string"}Errors
{ "status": "400", "code": "domain_not_registered", "message": "string"}AuthorizationbearerToken
Default authentication mechanism
400There was something wrong with the request
404The domain was not found in our system.
409The domain cannot be transfered out until the specified date.
429TooManyRequests