> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetConnection

# Package: googleBusinessProfile

# Namespace: GbpConnectionService

# Method link: https://dev.wix.com/docs/api-reference/business-management/google-business-profile/connection-v1/get-connection.md

## Permission Scopes:
Manage SEO Settings: SCOPE.PROMOTE.MANAGE-SEO

## Introduction

Retrieves the site's Google Business Profile connection status.

Returns `NEVER_CONNECTED` when no Google account has been connected. Poll
this after sending the site owner to the URL from Get Connect URL.

---

## REST API

### Schema

```
 Method: getConnection
 Description: Retrieves the site's Google Business Profile connection status.  Returns `NEVER_CONNECTED` when no Google account has been connected. Poll this after sending the site owner to the URL from Get Connect URL.
 URL: https://www.wixapis.com/gbp/v1/connection
 Method: GET
 Return type: GetConnectionResponse
  - name: connection | type: Connection | description: The site's connection. Absent when `status` is `NEVER_CONNECTED`.  
     - name: createdDate | type: string | description: Date and time the Google account was connected.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the connection was last updated.  | read-only: true | validation: format date-time
  - name: status | type: ConnectionStatus | description: Current status of the site's Google connection.  
     - enum:
     -     UNKNOWN_CONNECTION_STATUS: 
     -     NEVER_CONNECTED: No Google account has been connected for this site.
     -     VALID: The connection is usable.
     -     NEEDS_RECONNECT: The connection exists but its stored Google credentials are gone, for example because the Google account owner exercised a data-deletion request. The site owner must connect again.
  - name: lastConnectFailure | type: ConnectFailure | description: Why the site owner's most recently finished authorization attempt failed. Absent when that attempt succeeded, when no attempt has finished in the last 7 days, or when Wix cannot tell which site a failed attempt belonged to. An attempt still in progress is not reflected until it finishes, so compare `failed_date` with when you requested the connect URL.  Describes the attempt, not the connection: `status` stays authoritative. A site that is `VALID` can still report a failure here if the owner later started a reconnect and did not finish it.  
     - name: reason | type: ConnectFailureReason | description: Why the attempt failed.  
         - enum:
         -     ACCESS_DENIED: The site owner declined on Google's consent screen.
         -     SCOPE_NOT_GRANTED: The site owner approved sign-in but did not grant permission to manage their Business Profile. They must connect again and approve that permission.
         -     CONNECT_URL_ALREADY_USED: The site owner opened a connect URL that had already been used. Get a new URL from Get Connect URL.
         -     CONNECT_URL_EXPIRED: The site owner opened a connect URL after it expired. Get a new URL from Get Connect URL.
         -     GOOGLE_ERROR: Google returned an error or was unavailable.
         -     COMPLETION_FAILED: Wix could not complete the connection.
     - name: failedDate | type: string | description: Date and time the attempt failed.  | validation: format date-time

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: MULTIPLE_CONNECTIONS_NOT_REPRESENTABLE | Description: See GetConnectUrl: reported rather than answering for an arbitrary connection, which would be a silent lie a caller cannot detect.


```

### Examples

### Get the site's connection status
```curl
curl -X GET \
'https://www.wixapis.com/gbp/v1/connection' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.gbp.connection.getConnection()
 Description: Retrieves the site's Google Business Profile connection status.  Returns `NEVER_CONNECTED` when no Google account has been connected. Poll this after sending the site owner to the URL from Get Connect URL.
 Return type: PROMISE<GetConnectionResponse>
  - name: connection | type: Connection | description: The site's connection. Absent when `status` is `NEVER_CONNECTED`.  
     - name: _createdDate | type: Date | description: Date and time the Google account was connected.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the connection was last updated.  | read-only: true 
  - name: status | type: ConnectionStatus | description: Current status of the site's Google connection.  
     - enum:
     -     UNKNOWN_CONNECTION_STATUS: 
     -     NEVER_CONNECTED: No Google account has been connected for this site.
     -     VALID: The connection is usable.
     -     NEEDS_RECONNECT: The connection exists but its stored Google credentials are gone, for example because the Google account owner exercised a data-deletion request. The site owner must connect again.
  - name: lastConnectFailure | type: ConnectFailure | description: Why the site owner's most recently finished authorization attempt failed. Absent when that attempt succeeded, when no attempt has finished in the last 7 days, or when Wix cannot tell which site a failed attempt belonged to. An attempt still in progress is not reflected until it finishes, so compare `failed_date` with when you requested the connect URL.  Describes the attempt, not the connection: `status` stays authoritative. A site that is `VALID` can still report a failure here if the owner later started a reconnect and did not finish it.  
     - name: reason | type: ConnectFailureReason | description: Why the attempt failed.  
         - enum:
         -     ACCESS_DENIED: The site owner declined on Google's consent screen.
         -     SCOPE_NOT_GRANTED: The site owner approved sign-in but did not grant permission to manage their Business Profile. They must connect again and approve that permission.
         -     CONNECT_URL_ALREADY_USED: The site owner opened a connect URL that had already been used. Get a new URL from Get Connect URL.
         -     CONNECT_URL_EXPIRED: The site owner opened a connect URL after it expired. Get a new URL from Get Connect URL.
         -     GOOGLE_ERROR: Google returned an error or was unavailable.
         -     COMPLETION_FAILED: Wix could not complete the connection.
     - name: failedDate | type: Date | description: Date and time the attempt failed.  

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: MULTIPLE_CONNECTIONS_NOT_REPRESENTABLE | Description: See GetConnectUrl: reported rather than answering for an arbitrary connection, which would be a silent lie a caller cannot detect.


```

### Examples

### Get the site's connection status
Check whether the site has a usable Google Business Profile connection.

```javascript
import { connection } from "@wix/gbp";

async function getConnection() {
  const response = await connection.getConnection();

  console.log(response.status);
}

/* Promise resolves to:
 * {
 *   "connection": {
 *     "_createdDate": "2026-05-12T09:14:27.511Z",
 *     "_updatedDate": "2026-05-12T09:14:27.511Z"
 *   },
 *   "status": "VALID"
 * }
 */

```

### getConnection (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { connection } from '@wix/gbp';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { connection },
  // Include the auth strategy and host as relevant
});


async function getConnection() {
  const response = await myWixClient.connection.getConnection();
};
```

---