Search...
unsubscribeContactFromCategory( )
Developer Preview
Unsubscribes a contact from a specific forum category.
Description
By default a contact isn't subscribed to any forum categories.
By unsubscribing a contact from a category, the contact won’t receive notifications for that category.
If contactId
is not provided, it is implicitly resolved from the caller's context.
Admin Method
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Authorization
Request
This endpoint does not take any parameters
Response Object
Returns an empty object.
Status/Error Codes
Was this helpful?
unsubscribeContactFromCategory example
Copy Code
1import { categories } from '@wix/wix-forum.v2';23 async function unsubscribeContactFromCategory(categoryId, options) {4 try {5 const result = await categories.unsubscribeContactFromCategory(categoryId, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13