getEventBySlug( )


Retrieves an event by the slug URL.

The slug is the end of an event URL that refers to a specific event. For example, if an events' URL is https://example.com/events/event/{my-event-slug}, the slug is my-event-slug.

Permissions
Manage Bookings Services and Settings
Manage Events - all permissions
Read Events - all read permissions
Read Events
Manage Guest List
Manage Portfolio
Manage Restaurants - all permissions
Manage Events
Learn more about app permissions.
Method Declaration
Copy
function getEventBySlug(
  slug: string,
  options: GetEventBySlugOptions,
): Promise<GetEventBySlugResponse>;
Method Parameters
slugstringRequired

URL slug.


optionsGetEventBySlugOptions

Optional fields.

Returns
Return Type:Promise<GetEventBySlugResponse>
JavaScript
import { wixEventsV2 } from "@wix/events"; async function getEventBySlug(slug, options) { const response = await wixEventsV2.getEventBySlug(slug, options); }
Errors

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

Did this help?