> 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`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ProvisionMeetingsApp

# Package: meetings

# Namespace: MeetingsFormsProvisioner

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/meetings/provisioning-v1/provision-meetings-app.md

## Permission Scopes:
Manage Personal Scheduling, Forns & submissions, (can create his own staff): SCOPE.MEETINGS.MANAGE_OWN

## Introduction

Sets up [Wix Meetings](https://dev.wix.com/docs/api-reference/business-solutions/meetings/introduction.md) infrastructure on a site.

Use this method to provision the required components for Wix Meetings when building an app
that relies on Meetings functionality for customers who may not have the Meetings app installed.

Provisioning creates:
- A [headless OAuth client](https://dev.wix.com/docs/go-headless/self-managed-headless/authentication/oauth/create-a-client-for-authentication-with-oauth.md) named `WixMeetings` with `applicationType: SYSTEM` and `technology: REACT`.
- A [booking form](https://dev.wix.com/docs/api-reference/business-solutions/bookings/wix-forms-integration.md#booking-forms) using the `wix.meetings.form` namespace.
- A default [booking policy](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policies/introduction.md) with cancellation enabled and a 24-hour cancellation window.
- A default [schedule](https://dev.wix.com/docs/api-reference/business-management/calendar/schedules-v3/introduction.md) with 30-minute meeting duration.
- A default [service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction.md) (scheduling link) of type `APPOINTMENT` with the Wix Meetings `appId`.

This method is idempotent. Calling it multiple times on the same site
has no additional effect if the infrastructure already exists.

---

## REST API

### Schema

```
 Method: provisionMeetingsApp
 Description: Sets up [Wix Meetings](https://dev.wix.com/docs/api-reference/business-solutions/meetings/introduction.md) infrastructure on a site.  Use this method to provision the required components for Wix Meetings when building an app that relies on Meetings functionality for customers who may not have the Meetings app installed.  Provisioning creates: - A [headless OAuth client](https://dev.wix.com/docs/go-headless/self-managed-headless/authentication/oauth/create-a-client-for-authentication-with-oauth.md) named `WixMeetings` with `applicationType: SYSTEM` and `technology: REACT`. - A [booking form](https://dev.wix.com/docs/api-reference/business-solutions/bookings/wix-forms-integration.md#booking-forms) using the `wix.meetings.form` namespace. - A default [booking policy](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policies/introduction.md) with cancellation enabled and a 24-hour cancellation window. - A default [schedule](https://dev.wix.com/docs/api-reference/business-management/calendar/schedules-v3/introduction.md) with 30-minute meeting duration. - A default [service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction.md) (scheduling link) of type `APPOINTMENT` with the Wix Meetings `appId`.  This method is idempotent. Calling it multiple times on the same site has no additional effect if the infrastructure already exists.
 URL: https://www.wixapis.com/meetings/v1/provision-meetings-app
 Method: POST
 Return type: ProvisionMeetingsAppResponse
  - name: meetingsProvisioning | type: MeetingsProvisioning | description: The Wix Meetings infrastructure provisioned on the site.  
     - name: bookingFormId | type: string | description: GUID of the booking form created for Wix Meetings.  | validation: maxLength 256
     - name: bookingPolicyId | type: string | description: GUID of the default booking policy created for Wix Meetings.  | validation: maxLength 256
     - name: serviceId | type: string | description: GUID of the default service (scheduling link) created for Wix Meetings.  | validation: maxLength 256

 Possible Errors:
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_TO_CREATE_DEFAULT_SERVICE | Description: Default service (scheduling link) for Wix Meetings couldn't be created.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_TO_CREATE_POLICY | Description: Default booking policy for Wix Meetings couldn't be created.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_TO_CREATE_OAUTH_APP | Description: Headless OAuth client for Wix Meetings couldn't be created.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_TO_CREATE_DEFAULT_FORM | Description: Default booking form for Wix Meetings couldn't be created.


```

### Examples

### Provision Wix Meetings
```curl
curl -X POST \
'https://www.wixapis.com/meetings/v1/provision-meetings-app' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.meetings.meetingsFormsProvisioner.provisionMeetingsApp()
 Description: Sets up [Wix Meetings](https://dev.wix.com/docs/api-reference/business-solutions/meetings/introduction.md) infrastructure on a site.  Use this method to provision the required components for Wix Meetings when building an app that relies on Meetings functionality for customers who may not have the Meetings app installed.  Provisioning creates: - A [headless OAuth client](https://dev.wix.com/docs/go-headless/self-managed-headless/authentication/oauth/create-a-client-for-authentication-with-oauth.md) named `WixMeetings` with `applicationType: SYSTEM` and `technology: REACT`. - A [booking form](https://dev.wix.com/docs/api-reference/business-solutions/bookings/wix-forms-integration.md#booking-forms) using the `wix.meetings.form` namespace. - A default [booking policy](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policies/introduction.md) with cancellation enabled and a 24-hour cancellation window. - A default [schedule](https://dev.wix.com/docs/api-reference/business-management/calendar/schedules-v3/introduction.md) with 30-minute meeting duration. - A default [service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction.md) (scheduling link) of type `APPOINTMENT` with the Wix Meetings `appId`.  This method is idempotent. Calling it multiple times on the same site has no additional effect if the infrastructure already exists.
 Return type: PROMISE<ProvisionMeetingsAppResponse>
  - name: meetingsProvisioning | type: MeetingsProvisioning | description: The Wix Meetings infrastructure provisioned on the site.  
     - name: bookingFormId | type: string | description: GUID of the booking form created for Wix Meetings.  | validation: maxLength 256
     - name: bookingPolicyId | type: string | description: GUID of the default booking policy created for Wix Meetings.  | validation: maxLength 256
     - name: serviceId | type: string | description: GUID of the default service (scheduling link) created for Wix Meetings.  | validation: maxLength 256

 Possible Errors:
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_TO_CREATE_DEFAULT_SERVICE | Description: Default service (scheduling link) for Wix Meetings couldn't be created.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_TO_CREATE_POLICY | Description: Default booking policy for Wix Meetings couldn't be created.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_TO_CREATE_OAUTH_APP | Description: Headless OAuth client for Wix Meetings couldn't be created.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_TO_CREATE_DEFAULT_FORM | Description: Default booking form for Wix Meetings couldn't be created.


```

### Examples

### Provision Wix Meetings
```javascript
import { meetingsFormsProvisioner } from "@wix/meetings";

async function provisionMeetingsApp() {
  const response = await meetingsFormsProvisioner.provisionMeetingsApp();
}

/* Promise resolves to:
 * {
 *   "meetingsProvisioning": {
 *     "bookingFormId": "d7a341c4-196b-46e7-813c-2b0fc1847ec6",
 *     "bookingPolicyId": "a3f8b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
 *     "serviceId": "e8c9d0a1-2b3c-4d5e-6f7a-8b9c0d1e2f3a"
 *   }
 * }
 */

```

### provisionMeetingsApp (self-hosted)
Self-hosted 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 { meetingsFormsProvisioner } from '@wix/meetings';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function provisionMeetingsApp() {
  const response = await myWixClient.meetingsFormsProvisioner.provisionMeetingsApp();
};
```

---