About the GSC Connection API

The GSC Connection API connects a site to Google Search Console by linking a Google account to it. Once a site is connected, the GSC Site Readiness API can verify the site with Google, submit sitemaps, request indexing, and read search performance data.

A site has at most one Google Search Console connection, so no method takes a connection ID.

With the GSC Connection API, you can:

  • Start a Google authorization and retrieve the URL where the person connecting approves it.
  • Check whether the site is connected, and as which Google account.
  • Disconnect the site's Google account.

How connecting works

Connecting is a browser flow that's completed for you:

  1. Call Get Connect URL and surface the returned URL to the person connecting.
  2. They authorize Wix in their browser, on Google's consent screen.
  3. Google redirects back to Wix, where the OAuth exchange is completed and the credentials are stored server-side. There's no authorization code for you to exchange, and the API never returns tokens.
  4. Poll Get Connection until status is VALID.

Each connect URL is single-use and expires after 2 hours, so request a fresh one for every attempt.

Connection ownership

The connection belongs to the site, but it's owned by the Wix user who authorized it. Get Connection reports whether the current caller is that owner in ownedByCaller, and identifies the connected Google account by a masked email address only.

ownedByCaller is returned only when status is VALID or INVALID. It's false for any caller without a Wix user identity, so a false value means the caller isn't the owner, not that a particular other Wix user is.

Re-authorizing with the same Google account refreshes the stored credentials. Authorizing with a different Google account, or as a different Wix user, replaces the connection.

Before you begin

It's important to note the following points before starting to code:

  • The site the call is made on must be published, have a connected domain, and allow search-engine indexing. Otherwise, Get Connect URL fails with FAILED_PRECONDITION.
  • The connection is held by the site the call is made on. A site that isn't hosted on Wix doesn't get a connection of its own. It uses this connection through the GSC Site Readiness API, see Sites not hosted on Wix.
  • Any Google account can be used and needs no prior Search Console setup. Site verification and property access are established after connecting, through the GSC Site Readiness API.
  • Starting a connection requires a Wix user identity to own it. Calls without one fail with PERMISSION_DENIED.
  • A revoked connection isn't detected immediately. status becomes INVALID only after a Google Search Console call made with the stored credentials is rejected, so a broken connection can still report VALID.
  • A rejected Search Analytics call can cause a newly connected site to report INVALID before setup is complete. If site ownership hasn't been verified, call Verify Site in the GSC Site Readiness API before offering to connect again. Get Site Readiness does not update the stored connection status.

Use cases

Terminology

  • Connection: The link between a site and a Google account, held as Google credentials that are stored server-side and never returned.
  • Search Console property: The representation of a site in Google Search Console. Properties are managed with the GSC Site Readiness API after the site is connected.

Last updated: 25 October 2026

Did this help?