createOAuthApp( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a new OAuth app for a Wix Headless client.

An OAuth app authorizes an external client app or site, on any platform, to authenticate with a Wix site or project and manage its data.

Note: The OAuth app secret is returned only when creating the OAuth app, and can't be retrieved later. Store the secret in a secure location.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Headless Manage
Manage OAuth Apps
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
oAuthAppOAuthAppRequired

OAuth app to create.

Returns
Return Type:Promise<OAuthApp>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

getOAuthApp( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves an OAuth app by ID.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Headless Manage
Manage OAuth Apps
Read OAuth Apps
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
oAuthAppIdstringRequired

ID of the OAuth app to retrieve.

Returns
Return Type:Promise<OAuthApp>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

queryOAuthApps( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a list of OAuth apps, given the provided paging, filtering, and sorting.

Query OAuth Apps runs with these defaults, which you can override:

  • Results are sorted by id in descending order.
  • paging.offset is 0.
PROPERTYSUPPORTED FILTERS & SORTING
_ideq()
_createdDateascending(),descending()
nameascending(),descending()
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Headless Manage
Manage OAuth Apps
Read OAuth Apps
Learn more about app permissions.
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

updateOAuthApp( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates an OAuth app.

Only fields provided in mask are updated.

You can update the following fields:

  • name
  • description
  • allowedDomain
  • loginUrl
  • logoutUrl
  • technology
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Headless Manage
Manage OAuth Apps
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

ID of the OAuth app.


oAuthAppUpdateOAuthAppRequired

maskArray<string>Required

Explicit list of fields to update. Only fields listed are updated.

Returns
Return Type:Promise<OAuthApp>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onOAuthAppCreated( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when an OAuth app is created.

Permissions
Headless Manage
Manage OAuth Apps
Read OAuth Apps
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: OAuthAppCreatedEnvelope): void | Promise<void>

Did this help?

onOAuthAppDeleted( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when an OAuth app is deleted.

Permissions
Headless Manage
Manage OAuth Apps
Read OAuth Apps
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: OAuthAppDeletedEnvelope): void | Promise<void>

Did this help?

onOAuthAppUpdated( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when an OAuth app is updated.

Permissions
Headless Manage
Manage OAuth Apps
Read OAuth Apps
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: OAuthAppUpdatedEnvelope): void | Promise<void>

Did this help?

totalCount


totalCountnumber

Returns the total number of items that match the query.

totalCount returns the total number of items that match the query, not just the number of items in the current page. For the number of items in the current page, see length.

Did this help?

hasNext( )


Indicates whether the query has more results.

You can use the next() and prev() functions returned by oAuthApps to navigate the pages of a query result.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:boolean
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

hasPrev( )


Indicates whether the query has previous results.

You can use the next() and prev() functions returned by oAuthApps to navigate the pages of a query result.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:boolean
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

next( )


Retrieves the next page of query results.

The next() function retrieves the next page of query results. The page size is defined by the limit() function and can be retrieved using the pageSize property. You can use the next() and prev() functions returned by oAuthApps to navigate the pages of a query result. If items are added or removed between calls to next(), the values returned by OAuthAppsQueryBuilder may change.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<OAuthAppsQueryResult>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

prev( )


Retrieves the previous page of query results.

The prev() function retrieves the previous page of query results. The page size is defined by the limit() function and can be retrieved using the pageSize property. You can use the next() and prev() functions returned by oAuthApps to navigate the pages of a query result. If items are added or removed between calls to prev(), the values returned may change.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<OAuthAppsQueryResult>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?