Recently, I needed to organize a postal service for a small company. And I remembered my free Google Apps account. Unfortunately, the main domain, to which the account was tied, had long rested in Bose and was busy at the moment. Fortunately, several additional free domains were attached to the account, one of which was free and I registered it again. And then I had a question in front of me that appeared in the headline. Common situation? If you refer to the help of a respected Google, then we learn that it is
impossible to do .
In general, Google's help is a chaotic jumble of unstructured information, so you need to think carefully about the wording of the request to find something there (of course, you should always think about the wording, but here it is especially).
But, we are not accustomed to retreat, especially since in the description of the API from Google, I came across
encouraging information . I wanted to use the API from Google in some simple way, not related to writing and registering my own applications. And this method
was found . But as it turned out, there is an even easier way.
When describing the methods and variables of its API, Google provides a service that allows them to be tested on the running services.
So, we enable API access for our Google Apps, this is done in the admin console, in the Security section, in the API Reference subsection, just in case a
link , but since Google often changes the administrative console interface, it’s not a fact that will be working after a while.
')
Now let's get started, we are interested in the “update” method for the “customers” field. Here is the
link . Go to the “try it” item, move the authorization slider and authorize the API for the changes we need (by default, there are already birds on the items that our method uses, so there is no need to put them on all).
In the “Customer Key” field, fill in a unique identifier for our Google Apps or simply write “my_customer” for the current user (in this case, you must first log in as a Google Apps administrator).
In the "fields" field, click the "Use fields editor" button and put a birdie in front of the "customerDomain".
In the request body “Request body” we add the property “customerDomain” and fill its value with the name of our domain (the domain must first be added to the list of domains for Google Apps).
We press the button “Authorize and execute” and, if we did everything correctly, our domain will become the main one.
After that, you can delete unnecessary domains, but you can not delete them - let them hang.
More recently, Google has banned the addition of new domains to old free accounts, but this can be circumvented by including the 30-day trial of Google Apps for Works, adding and changing the domain, and then
returning to a free account .
I think that the information will also be useful for owners of Google services for domains for business, because there too it is impossible to change the main domain in a simple and natural way.
Thanks for attention.