> 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

# GetLocationAdmins

# Package: googleBusinessProfile

# Namespace: GbpLocationsService

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

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

## Introduction

Retrieves the accounts that manage a location's Business Profile, including
invitations that haven't been accepted yet.

Use it to check who already has access before inviting someone, because
Google rejects an invitation for an account that already manages the
location.

---

## REST API

### Schema

```
 Method: getLocationAdmins
 Description: Retrieves the accounts that manage a location's Business Profile, including invitations that haven't been accepted yet.  Use it to check who already has access before inviting someone, because Google rejects an invitation for an account that already manages the location.
 URL: https://www.wixapis.com/gbp/v1/locations/{locationId}/admins
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  locationId
 Method parameters: 
   param name: locationId | type:   none | required: true 
 Return type: GetLocationAdminsResponse
  - name: locationAdmins | type: array<LocationAdmin> | description: The accounts that manage this location, including any that have been invited but haven't accepted yet.  
     - name: id | type: string | description: Identifier of this admin record.  | read-only: true | validation: format GUID
     - name: googleLocationId | type: string | description: The Google location this admin record applies to.  | read-only: true | validation: maxLength 1024
     - name: name | type: string | description: Email address or account name of the manager, or of the invited account.  | read-only: true | validation: maxLength 1024
     - name: accountResourceName | type: string | description: Resource name of the Google Account this Admin refers to (e.g. "accounts/12345").  | read-only: true | validation: maxLength 1024
     - name: role | type: Role | description: Role granted to this admin.  
         - enum:
         -     UNKNOWN: 
         -     ADMIN_ROLE_UNSPECIFIED: 
         -     MANAGER: Can manage the profile but not transfer or delete it.
         -     OWNER: Owner-level access to the profile.
         -     PRIMARY_OWNER: The primary owner. A location has exactly one.
         -     SITE_MANAGER: Legacy Google+ pages manager. Google no longer grants this.
     - name: pendingInvitation | type: boolean | description: True if the admin has been invited but has not accepted yet.  


```

### Examples

### List a location's admins and pending invitations
```curl
curl -X GET \
'https://www.wixapis.com/gbp/v1/locations/8034569321457853640/admins' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.gbp.locations.getLocationAdmins(locationId)
 Description: Retrieves the accounts that manage a location's Business Profile, including invitations that haven't been accepted yet.  Use it to check who already has access before inviting someone, because Google rejects an invitation for an account that already manages the location.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  locationId
 Method parameters: 
   param name: locationId | type: string | description: Location GUID (Google's opaque location id) to list admins for. | required: true | validation: maxLength 1024
 Return type: PROMISE<GetLocationAdminsResponse>
  - name: locationAdmins | type: array<LocationAdmin> | description: The accounts that manage this location, including any that have been invited but haven't accepted yet.  
     - name: _id | type: string | description: Identifier of this admin record.  | read-only: true | validation: format GUID
     - name: googleLocationId | type: string | description: The Google location this admin record applies to.  | read-only: true | validation: maxLength 1024
     - name: name | type: string | description: Email address or account name of the manager, or of the invited account.  | read-only: true | validation: maxLength 1024
     - name: accountResourceName | type: string | description: Resource name of the Google Account this Admin refers to (e.g. "accounts/12345").  | read-only: true | validation: maxLength 1024
     - name: role | type: Role | description: Role granted to this admin.  
         - enum:
         -     UNKNOWN: 
         -     ADMIN_ROLE_UNSPECIFIED: 
         -     MANAGER: Can manage the profile but not transfer or delete it.
         -     OWNER: Owner-level access to the profile.
         -     PRIMARY_OWNER: The primary owner. A location has exactly one.
         -     SITE_MANAGER: Legacy Google+ pages manager. Google no longer grants this.
     - name: pendingInvitation | type: boolean | description: True if the admin has been invited but has not accepted yet.  


```

### Examples

### List a location's admins and pending invitations
See who manages the listing and which invitations are still open.

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

async function getLocationAdmins() {
  const response = await locations.getLocationAdmins("8034569321457853640");

  console.log(response.locationAdmins);
}

/* Promise resolves to:
 * {
 *   "locationAdmins": [
 *     {
 *       "_id": "3f1c86a4-92d5-4e07-b8f1-6d2a94c7e5b3",
 *       "googleLocationId": "8034569321457853640",
 *       "name": "accounts/104312867792031877552/admins/1147835926804417253",
 *       "accountResourceName": "accounts/104312867792031877552",
 *       "role": "PRIMARY_OWNER",
 *       "pendingInvitation": false
 *     },
 *     {
 *       "_id": "a95e02d7-3c48-41b6-9e7a-08f4b1d6c2e9",
 *       "googleLocationId": "8034569321457853640",
 *       "accountResourceName": "accounts/117294061835274490216",
 *       "role": "MANAGER",
 *       "pendingInvitation": true
 *     }
 *   ]
 * }
 */

```

### getLocationAdmins (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 { locations } from '@wix/gbp';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function getLocationAdmins(locationId) {
  const response = await myWixClient.locations.getLocationAdmins(locationId);
};
```

---