updateUserFavoriteList( )


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 the current user's list of favorite dashboard pages.

Make sure to include the current revision number when calling this endpoint.

Note: Updating the list replaces the favorite pages it contains with those passed to the endpoint.

Authentication

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

Permissions
Manage Dashboard
Learn more about app permissions.
Method Declaration
Copy
function updateUserFavoriteList(
  _id: string,
  favoriteList: UpdateUserFavoriteList,
  options: UpdateUserFavoriteListOptions,
): Promise<DashboardFavoriteList>;
Method Parameters
_idstringRequired

Dashboard favorite list ID. Automatically generated by Wix.


favoriteListUpdateUserFavoriteListRequired

optionsUpdateUserFavoriteListOptions
Returns
Return Type:Promise<DashboardFavoriteList>
JavaScript
import { favoriteList } from "wix-dashboard-management.v2"; async function updateUserFavoriteList(id, favoriteList, options) { try { const result = await favoriteList.updateUserFavoriteList( id, favoriteList, 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?