how to set Google index API with halo plugin sitepush
This article is share setting push site to google search via halo-plugin-sitepush
Prerequisites for the Indexing API
- Create a project for your client
- Create a service account
- Add your service account as a site owner
Create a project for your client
login your google account and go to https://console.cloud.google.com/apis/credentials
new a project
Create a service account
-
Open the Service accounts page. If prompted, select a project.
-
Click Create Service Account, enter a name and description for the service account. You can use the default service account ID, or choose a different, unique one. When done click Create.
-
The Service account permissions (optional) section that follows is not required. Click Continue.
-
On the Grant users access to this service account screen, scroll down to the Create key section. Click add Create key.
-
In the side panel that appears, select the format for your key: JSON is recommended.
-
Click Create. Your new public/private key pair is generated and downloaded to your machine; it serves as the only copy of this key. For information on how to store it securely, see Manageing service account keys.
-
Click Close on the Private key saved to your computer dialog, then click Done to return to the table of your service accounts.
Add your service account as a site owner
To add your service account as a site owner:
- First prove that you own the site, using Search Console, then
- Add your service account as an owner.
1. Prove that you own the site
2. Grant owner status to your service account
Next, add your service account as a (delegated) site owner:
-
Open Webmaster Central.
-
Click the property for which you verified ownership.
-
In the Verified owner list, click Add an owner.
-
Provide your service account email as the delegated owner. You can find your service account email address in two places:
- The
client_email
field in the JSON private key that you downloaded when you created your project. - The Service account ID column of the Service Accounts view in the Developers Console.
The email address has a format like this:
my-service-account@project-name.google.com.iam.gserviceaccount.com
For example: nivnek-index@mapapi-297206.iam.gserviceaccount.com
评论区