Chat Widget Access Control Estimated reading: 3 minutes 8 views Contributors Summary: Welcome to the official feature documentation for Chat Widget Access Control in Antimanual. This guide provides comprehensive, step-by-step instructions for website administrators to configure, manage, and secure access to the Antimanual AI Chatbot. Chat Widget Access Control allows site administrators to restrict who can view and interact with the Antimanual AI Chatbot based on WordPress user roles and login status. What It Does Instead of displaying the chatbot widget to all website visitors by default, Access Control allows you to restrict chatbot availability based on specific criteria: WordPress User Roles: Select specific roles (e.g., Subscriber, Customer, Author, Editor, or custom membership roles) that are allowed to use the chatbot. Guest vs. Logged-in Status: Decide whether unauthenticated (logged-out) visitors can view and interact with the chatbot or if access requires logging in. Server-Side Security Enforcement: Automatically blocks chatbot HTML rendering, script enqueues, and direct REST API requests (/messages and /messages/stream) for unauthorized users, returning an HTTP 403 Forbidden status. Developer Extensibility: Provides a PHP filter hook (antimanual_chatbot_access_allowed) allowing custom membership or subscription plugins (e.g., WooCommerce Subscriptions, MemberPress) to dynamically control access. Primary Benefits Exclusive Member Perks: Limit AI chatbot usage to paying subscribers or registered members. API Token Protection: Reduce OpenAI / Gemini / Anthropic API costs by preventing unauthenticated public visitors from asking queries. Internal Staff Tool: Restrict the chatbot to internal roles (such as Editors and Authors) for internal documentation assistance. 1. Plan Eligibility & Trial Access Plan Requirement: Pro-Max Plan exclusive. 14-Day Free Trial: Fully available during your official 14-day evaluation trial. Trial Expiration: Saved settings are preserved in the database if your trial expires and will reactivate automatically when a Pro-Max license is attached. 2. How to Enable & Configure Go to WP Admin > Antimanual > Chatbot. Click the Configuration tab and select Advanced from the sidebar. Locate Chat Widget Access Control and switch Enable Access Control to ON. Configure your desired Allowed User Roles and Guest Access options. Click Save Changes. 3. Settings Reference SettingControlDefaultDescriptionEnable Access ControlToggleOFFMaster switch. When OFF, the chatbot uses default visibility.Allowed User RolesMulti-Select[] (All Roles)Select which logged-in user roles can use the chatbot. Leave empty to allow all logged-in users. Automatically supports custom roles.Allow Guest AccessToggleONTurn OFF to block logged-out visitors from seeing or using the chatbot. Note: Administrators (manage_options) automatically maintain access on the front end to verify chatbot performance. 4. How Access Control Protects Your Site Antimanual enforces access restriction using a triple-layer server-side security model: Zero-DOM Rendering: Unallowed visitors receive no chatbot HTML markup. Zero-Asset Loading: Chatbot scripts (chatbot.js) and styles are not enqueued, preserving page speed. API Protection: Direct REST API calls to /messages or /messages/stream return HTTP 403 Forbidden for unauthorized visitors. 5. Developer Hook (Custom Integrations) Extend access decisions for custom membership or subscription plugins using the antimanual_chatbot_access_allowed PHP filter: // Example: Restrict chatbot to active WooCommerce subscribers add_filter( 'antimanual_chatbot_access_allowed', function( $allowed, $user_id, $settings ) { if ( $user_id > 0 && function_exists( 'wcs_user_has_subscription' ) ) { return wcs_user_has_subscription( $user_id, '', 'active' ); } return $allowed; }, 10, 3 ); Need Further Assistance? If you encounter any issues or have questions regarding Chat Widget Access Control, please visit our official support channels: Support Portal: https://helpdesk.spider-themes.net/ask/ Chat Widget Access Control - PreviousContent Moderation and SecurityNext - Chat Widget Access ControlAI Search Intelligence