> 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 # Package: headless # Namespace: oauthApps # Webhook link: https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/oauth-app-updated.md ## Introduction Triggered when an OAuth app is updated. --- ## REST API ### Schema ``` Webhook: OAuth App Updated Description: Triggered when an OAuth app is updated. Event body: - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events. - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event. - name: slug | type: string | description: Event name. - name: entityId | type: string | description: ID of the entity associated with the event. - name: eventTime | type: string (date-time) | description: Event timestamp. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR. - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: updatedEvent | type: object | description: Updated event details. - name: currentEntity | type: OAuthApp | description: The entity after the update. - name: id | type: string | description: GUID of the OAuth app. - name: createdDate | type: string | description: Date and time the OAuth app was created, in ISO 8601 format. - name: name | type: string | description: Display name of the OAuth app, as it appears in the dashboard. - name: description | type: string | description: Description of the OAuth app, as it appears in the dashboard. - name: loginUrl | type: string | description: External login URL to which users are redirected automatically to authenticate. If no login URL is specified, the user is redirected to Wix to authenticate. - name: allowedRedirectUris | type: array | description: List of URIs to which redirection from Wix is allowed after authentication. When a client redirects a user to Wix for authentication, the client provides a URI to redirect the user back to after the user has been authenticated. Wix only redirects the user if the exact URI is contained in this array. - name: allowedRedirectDomains | type: array | description: List of domains to which redirection from Wix is allowed after processes other than authentication. When a client redirects a user to a Wix page (for example, for checkout), the client provides a URL to redirect the user back to. Wix only redirects the user if the URL is in one of the specified domains. - name: allowSecretGeneration | type: boolean | description: For internal use only. - name: logoutUrl | type: string | description: External logout URL to which we invoke when user logout at wix. If no logout URL is specified, the user is logged out only at Wix. - name: applicationType | type: OAuthAppType | description: OAuth application type. - enum: - OAUTH_APP_TYPE_UNSPECIFIED: OAuth app type is not specified. - WEB_APP: OAuth app type is a web application. - MOBILE: OAuth app type is a mobile application. - OTHER: OAuth app type is some other type of application. - name: technology | type: OAuthTechnologies | description: OAuth technology used by the oauth application. - enum: - OAUTH_TECHNOLOGY_UNSPECIFIED: The OAuth technology is not specified. - JAVASCRIPT: OAuth technology using JavaScript. - ANGULAR: OAuth technology using Angular. - VUE: OAuth technology using Vue.js. - REACT: OAuth technology using React. - REACT_NATIVE: OAuth technology using React Native. - IOS: OAuth technology using iOS. - ANDROID: OAuth technology using Android. - OTHER_TECHNOLOGY: OAuth technology using some other kind of technology. - name: wixPagesDomainsMappings | type: array | description: List of domain mappings from external domains to Wix domains. When a user accesses a non-Wix domain, they can be automatically forwarded to the corresponding Wix domain based on these mappings. This enables domain-level redirection from external domains to Wix-hosted pages. - name: origin | type: string | description: - name: destination | type: string | description: - name: redirectUrlWixPages | type: string | description: Redirect url for Wix-hosted pages. ``` --- ## JavaScript SDK ### Schema ``` Webhook: onOAuthAppUpdated Description: Triggered when an OAuth app is updated. Payload: OAuthAppUpdatedEnvelope - name: entity | type: OAuthApp | description: none - name: _id | type: string | description: GUID of the OAuth app. - name: _createdDate | type: Date | description: Date and time the OAuth app was created, in ISO 8601 format. - name: name | type: string | description: Display name of the OAuth app, as it appears in the dashboard. - name: description | type: string | description: Description of the OAuth app, as it appears in the dashboard. - name: loginUrl | type: string | description: External login URL to which users are redirected automatically to authenticate. If no login URL is specified, the user is redirected to Wix to authenticate. - name: allowedRedirectUris | type: array | description: List of URIs to which redirection from Wix is allowed after authentication. When a client redirects a user to Wix for authentication, the client provides a URI to redirect the user back to after the user has been authenticated. Wix only redirects the user if the exact URI is contained in this array. - name: allowedRedirectDomains | type: array | description: List of domains to which redirection from Wix is allowed after processes other than authentication. When a client redirects a user to a Wix page (for example, for checkout), the client provides a URL to redirect the user back to. Wix only redirects the user if the URL is in one of the specified domains. - name: allowSecretGeneration | type: boolean | description: For internal use only. - name: logoutUrl | type: string | description: External logout URL to which we invoke when user logout at wix. If no logout URL is specified, the user is logged out only at Wix. - name: applicationType | type: OAuthAppType | description: OAuth application type. - enum: - OAUTH_APP_TYPE_UNSPECIFIED: OAuth app type is not specified. - WEB_APP: OAuth app type is a web application. - MOBILE: OAuth app type is a mobile application. - OTHER: OAuth app type is some other type of application. - name: technology | type: OAuthTechnologies | description: OAuth technology used by the oauth application. - enum: - OAUTH_TECHNOLOGY_UNSPECIFIED: The OAuth technology is not specified. - JAVASCRIPT: OAuth technology using JavaScript. - ANGULAR: OAuth technology using Angular. - VUE: OAuth technology using Vue.js. - REACT: OAuth technology using React. - REACT_NATIVE: OAuth technology using React Native. - IOS: OAuth technology using iOS. - ANDROID: OAuth technology using Android. - OTHER_TECHNOLOGY: OAuth technology using some other kind of technology. - name: wixPagesDomainsMappings | type: array | description: List of domain mappings from external domains to Wix domains. When a user accesses a non-Wix domain, they can be automatically forwarded to the corresponding Wix domain based on these mappings. This enables domain-level redirection from external domains to Wix-hosted pages. - name: origin | type: string | description: - name: destination | type: string | description: - name: redirectUrlWixPages | type: string | description: Redirect url for Wix-hosted pages. - name: metadata | type: EventMetadata | description: none - name: instanceId | type: string | description: App instance GUID. - name: eventType | type: string | description: Event type. - name: identity | type: IdentificationData | description: The identification type and identity data. - ONE-OF: - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site. - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site. - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.). - name: appId | type: string | description: GUID of an app. - name: identityType | type: WebhookIdentityType | description: - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP - name: accountInfo | type: AccountInfo | description: Details related to the account - name: accountId | type: string | description: GUID of the Wix account associated with the event. - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account. - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site. - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them. - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. - name: entityId | type: string | description: GUID of the entity associated with the event. - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR). - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. ``` ### Examples ```javascript import { oAuthApps } from '@wix/auth-management'; oAuthApps.onOAuthAppUpdated((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { oAuthApps } from '@wix/auth-management'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { oAuthApps, }, }); wixClient.oAuthApps.onOAuthAppUpdated((event) => { // handle your event here }); ``` ---