This page describes how to get or reset an authorization code.
To transfer a domain to a third-partyregistrar, you must getan authorization code to provide to your new registrar.
If an unauthorized party gets access to your authorization code, you can protectyour domain by resetting the authorization code.
Permissions required for this task
To perform this task, you must have been granted the following permissionsor the following IAM roles.
Permissions
domains.registrations.configureManagement
Roles
roles/domains.admin
Get the authorization code
To get the authorization code for a specific domain, complete the followingsteps.
Console
In the Google Cloud console, go to the Cloud Domains page.
On the Registrations list, click the domain name that youwant 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 gclouddomains registrations authorization-code get
command:
gcloud domains registrations authorization-code get DOMAIN_NAME
Replace DOMAIN_NAME
with the name of the registereddomain that you want to get the authorization code for, such asexample.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 theregistrations.retrieveAuthorizationCode
methodwith 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 theauthorization 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 thefollowing steps.
Console
In the Google Cloud console, go to the Cloud Domains page.
On the Registrations list, click the domain name that you wantto transfer.
On the Domain details page, click Authorization code.
In the Authorization code dialog, click Reset.
gcloud
Use the gclouddomains registrations authorization-code reset
command:
gcloud domains registrations authorization-code reset DOMAIN_NAME
Replace DOMAIN_NAME
with the name of the registered domainthat you want to reset the authorization code for, such as example.app
.
Your output looks similar to the following:
code: d637oEVWKpqgDT88
API
Use theregistrations.resetAuthorizationCode
methodwith 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 theauthorization code for
What's next
- To edit registration settings using Cloud Domains, seeEdit registration settings.
- To access API information, see theCloud Domains API.
- To find solutions for common issues that you might encounter when usingCloud Domains, seeTroubleshooting.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-10 UTC.
[{ "type": "thumb-down", "id": "hardToUnderstand", "label":"Hard to understand" },{ "type": "thumb-down", "id": "incorrectInformationOrSampleCode", "label":"Incorrect information or sample code" },{ "type": "thumb-down", "id": "missingTheInformationSamplesINeed", "label":"Missing the information/samples I need" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]