publish( )


Deprecated

This method is deprecated.

Use

Publishes a message to a channel or resource.

Subscribers to a channel don't receive messages published to a resource on that channel, and vice versa.

To publish a message to specific users only, specify the users by ID in the options parameter. To include the publisher's identity in the message, set includePublisher to true in the options parameter.

Method Declaration
Copy
Method Parameters
channelChannelRequired

Channel, and optionally resource, to publish to.


payloadanyRequired

Message payload. Max: 10 KB.


optionsPublishOptions

Options for publishing, such as targeting specific users.

Errors

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

Did this help?