GET

Get Connect Url


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 the Google authorization URL for the site owner to open.

Surface the returned URL to the site owner. After they authorize in their browser, Wix completes the OAuth exchange server-side; poll Get Connection until the status is VALID.

Each call starts a new authorization attempt: the returned URL is single-use and expires after 15 minutes, so request a fresh one for every attempt rather than caching or reusing one.

An already-connected site may call this too — reconnecting is a supported flow. Authorizing with the same Google account heals the connection in place, as long as its stored credentials are still there (Get Connection reports VALID); authorizing with a different one replaces it — permanently removing every location on the connection it replaced — the ones created through this API as well as the ones imported from Google.

NEEDS_RECONNECT is the exception, and it is the one status that asks you to reconnect. The stored credentials are already gone, so Wix can no longer prove which Google account the connection belonged to and treats the reconnect as a replacement even when the owner authorizes with the same account. Warn the site owner before starting this flow from NEEDS_RECONNECT: it permanently removes every location on the old connection.

The resulting connection is owned by the calling user. When the caller is an app rather than a user, it is owned by the site owner instead.

Authentication

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

Permissions
Manage SEO Settings
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/gbp/v1/connect-url

Errors
428Failed Precondition

There are 2 errors with this status code.

503Unavailable

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?