This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.
A Wix user wants their site connected to Bing Webmaster Tools so it can be added, verified, and submit its sitemap. Your app runs the authorization and waits for it to complete.
To connect a site:
VALID means only that stored credentials exist: Microsoft can revoke them without Get Connection noticing. So when status is VALID, also call Get Site Readiness. If its blockingReason isn't NOT_CONNECTED, the connection works: skip the remaining steps and continue with the BWT Site Readiness API, unless the Wix user wants a different Microsoft account. Don't call Get Connect URL for a working connection: authorizing with the same Microsoft account only refreshes its credentials, but authorizing with a different one replaces the connected account.status is VALID or INVALID and you're reconnecting, for example because Get Site Readiness reports NOT_CONNECTED or the Wix user wants a different Microsoft account, call Disconnect first. While stored credentials exist, neither Get Connection nor Get Site Readiness reports when a new authorization finishes, so a reconnect without Disconnect can't be followed. After Disconnect, status is NOT_CONNECTED.connectUrl. If the call fails with FAILED_PRECONDITION, resolve the reported problem first: publish the site, connect a domain, or allow search-engine indexing.connectUrl for the person connecting in a new browser tab or a top-level window. Don't open it in a popup that keeps a reference to your page. The URL is single-use and expires after 2 hours, so request a fresh one for every attempt.status is PENDING while the person authorizes, and becomes VALID when the exchange completes. If it goes back to NOT_CONNECTED, the person declined or the authorization failed, so stop and offer to try again.connectUrl: the person must finish on Bing within that window. Request a fresh URL to try again. An abandoned attempt can keep reporting PENDING for up to 2 hours, so don't wait for it to change on its own.Your app has a settings page that shows whether the site is connected to Bing Webmaster Tools, and offers the right action for the current state.
To show the connection status:
status. For VALID, show the site as connected, after checking that Get Site Readiness doesn't report NOT_CONNECTED. If it does, offer to reconnect. For INVALID, tell the Wix user the connection stopped working and offer to reconnect. To reconnect, call Disconnect first, then follow Connect a site to Bing Webmaster Tools. For PENDING, show that an authorization was started and hasn't completed. It can stay PENDING for up to 2 hours after an attempt is abandoned, so offer to start a new one. For NOT_CONNECTED, offer to connect.ownedByCaller only when status is VALID or INVALID. When it's false, the current caller doesn't own the connection, so offer to replace it with care rather than presenting it as theirs. Don't read false as proof that a specific other Wix user connected the account.A Wix user wants Wix to stop using their Microsoft account for this site, for example before handing the site over to someone else.
Disconnecting removes only this site's connection. Other sites connected with the same Microsoft account stay connected, and an authorization attempt still in progress for this site is cancelled. It doesn't remove the site's msvalidate.01 tag (use Clear Verification in the BWT Site Readiness API for that), doesn't change anything in the Bing account, and doesn't revoke Wix's access on Microsoft's side. The account owner can revoke it from their Microsoft account settings.
To disconnect a site:
NOT_FOUND (CONNECTION_NOT_FOUND) error means the site has no stored credentials, so there's nothing to disconnect. An UNAVAILABLE (BWT_SITE_BUSY) error means another Bing Webmaster Tools operation is running on the site, so retry.status is NOT_CONNECTED.Last updated: 25 October 2026