GSC Connection: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

Connect a site to Google Search Console

A site owner wants their site connected to Google Search Console so it can be verified, submit sitemaps, and report search performance. Your app runs the authorization and waits for it to complete.

To connect a site:

  1. Call Get Connection to check the starting point. If status is already VALID, the site is connected and there's nothing to do.
  2. Call Get Connect URL and store the returned connectUrl. If the call fails with FAILED_PRECONDITION, resolve the reported problem first: publish the site, connect a domain, or allow search-engine indexing.
  3. Surface connectUrl to the person connecting, for example by opening it in a new browser tab. The URL is single-use and expires after 2 hours, so request a fresh one for every attempt.
  4. Poll Get Connection every few seconds. status is PENDING while the person authorizes, and becomes VALID when Wix completes the exchange. Stop polling after 2 hours, when the attempt expires.

Show the site's connection status

Your app has a settings page that shows whether the site is connected to Google Search Console, and offers the right action for the current state.

To show the connection status:

  1. Call Get Connection.
  2. Present the returned status. For VALID, show the connected account's connectedEmailMasking. For INVALID, tell the site owner the connection stopped working and offer to reconnect with Get Connect URL. For NOT_CONNECTED, offer to connect.
  3. Use ownedByCaller only when status is VALID or INVALID, where it's returned. When it's false, the current caller doesn't own the connection, so offer to replace it with care rather than presenting it as theirs. Don't read false as proof that a specific other Wix user connected the account.

Disconnect a Google account

A site owner wants Wix to stop using their Google account, for example before handing the site over to someone else.

Disconnecting deletes the stored credentials, but doesn't remove the site's google-site-verification tag and doesn't revoke Wix's access on Google's side. The account owner can revoke it from their Google account settings.

To disconnect a site:

  1. Call Get Connection to confirm the site is connected and show which account is about to be disconnected.
  2. Call Disconnect. A NOT_FOUND error means the site has no stored credentials, so there's nothing to disconnect.
  3. Call Get Connection again to confirm status is NOT_CONNECTED.

Last updated: 7 September 2026

Did this help?