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
In the Google Cloud console, go to the Cloud Domains page.
On the Registrations list, click the domain name that you want to transfer.
On the Domain details page, click Authorization code.
The code is available in the Authorization code dialog.
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 projectDOMAIN_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
In the Google Cloud console, go to the Cloud Domains page.
On the Registrations list, click the domain name that you want to transfer.
On the Domain details page, click Authorization code.
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 projectDOMAIN_NAME
: the domain that you want to reset the authorization code for
What's next
- To edit registration settings using Cloud Domains, see Edit registration settings.
- To access API information, see the Cloud Domains API.
- To find solutions for common issues that you might encounter when using Cloud Domains, see Troubleshooting.