listPublishedSiteUrls( )


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 a site's published URLs. If a site hasn't been published, the call returns an empty array.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Read Site URLs
Learn more about app permissions.
Method Declaration
Copy
function listPublishedSiteUrls(
  options: ListPublishedSiteUrlsOptions,
): Promise<ListPublishedSiteUrlsResponse>;
Method Parameters
optionsListPublishedSiteUrlsOptions
Returns
Return Type:Promise<ListPublishedSiteUrlsResponse>
JavaScript
import { site } from "wix-urls.v2"; async function listPublishedSiteUrls(options) { try { const result = await site.listPublishedSiteUrls(options); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

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

Did this help?