Get or reset an authorization code

This page describes how to get or reset an authorization code.

To transfer a domain to a third-party registrar, you must get an authorization code to provide to your new registrar.

If an unauthorized party gets access to your authorization code, you can protect your domain by resetting the authorization code.

Get the authorization code

To get the authorization code for a specific domain, complete the following steps.

Console

  1. In the Google Cloud console, go to the Cloud Domains page.

    Go to Cloud Domains

  2. On the Registrations list, click the domain name that you want to transfer.

  3. On the Domain details page, click Authorization code.

  4. The code is available in the Authorization code dialog.

  5. Copy the code to provide to your new registrar.

gcloud

Use the gcloud domains registrations authorization-code get command:

gcloud domains registrations authorization-code get DOMAIN_NAME

Replace DOMAIN_NAME with the name of the registered domain that you want to get the authorization code for, such as example.app.

Your output looks similar to the following:

code: 0ahDsXjSBwGL7fbr

Copy the code from the command output to provide to your new registrar.

API

Use the registrations.retrieveAuthorizationCode method with an empty body:

GET https://domains.googleapis.com/v1/projects/PROJECT_ID/locations/global/registrations/DOMAIN_NAME:retrieveAuthorizationCode

Replace the following:

  • PROJECT_ID: the name of the project
  • DOMAIN_NAME: the domain that you want to get the authorization code for

Copy the code from the output and provide it to your new registrar.

Reset the authorization code

To reset the authorization code for a specific domain, complete the following steps.

Console

  1. In the Google Cloud console, go to the Cloud Domains page.

    Go to Cloud Domains

  2. On the Registrations list, click the domain name that you want to transfer.

  3. On the Domain details page, click Authorization code.

  4. In the Authorization code dialog, click Reset.

gcloud

Use the gcloud domains registrations authorization-code reset command:

gcloud domains registrations authorization-code reset DOMAIN_NAME

Replace DOMAIN_NAME with the name of the registered domain that you want to reset the authorization code for, such as example.app.

Your output looks similar to the following:

code: d637oEVWKpqgDT88

API

Use the registrations.resetAuthorizationCode method with an empty body:

POST https://domains.googleapis.com/v1/projects/PROJECT_ID/locations/global/registrations/DOMAIN_NAME:resetAuthorizationCode

Replace the following:

  • PROJECT_ID: the name of the project
  • DOMAIN_NAME: the domain that you want to reset the authorization code for

What's next