Skip to content

Add Dzen Chat to WordPress

The Dzen Chat WordPress plugin connects a WordPress website to a Dzen Chat project, displays a chat widget and sends updates for public pages and posts.

Compatibility

The plugin currently implements Integration API v1. The public API documented here uses bearer credentials and /api/... resources, while the plugin expects the earlier registration and exchange contract. It cannot finish connecting to the current service until that contract is aligned. Installing or activating the plugin alone does not prove that the connection works.

The guide below preserves the intended setup and operational requirements. Use it when working with a service that implements the plugin's required contract.

Before you install

You need:

  • WordPress 6.8 or later, PHP 8.2 or later, and the PHP sodium extension.
  • WordPress administrator access and a Dzen Chat account able to authorize the chosen project.
  • HTTPS for the public site and WordPress admin. A site installed under a path, such as /blog/, must keep that path in its callback URL.
  • Real AUTH_KEY and SECURE_AUTH_KEY values in wp-config.php; the plugin uses them to encrypt stored credentials.

Download and install

Get the plugin from the dzenplatform/dzen-wordpress repository. There is no published GitHub release at present. Build the package from a checkout:

git clone git@github.com:dzenplatform/dzen-wordpress.git
cd dzen-wordpress
make package

For version 0.1.1 this produces dist/dzen-chat-0.1.1.zip.

  1. In WordPress, open Plugins → Add New Plugin → Upload Plugin.
  2. Select the ZIP, install it, then activate Dzen Chat.
  3. Open Dzen Chat in the WordPress admin.

Intended connection flow

On a compatible Dzen Chat service:

  1. Start connection from the WordPress Dzen Chat page.
  2. Sign in to Dzen Chat and confirm the exact site address.
  3. Choose a project you own, or create one.
  4. Return to WordPress through the automatic redirect and verify the project and site shown by the plugin.

The plugin exchanges a one-time code server-to-server and stores credentials encrypted. Do not put a client secret into browser JavaScript.

Widget and content synchronization

After verification, select a widget in the plugin. Remove any manually added copy of the same script to avoid duplicate widgets. Test a public page as a visitor: the widget must open and answer a question about indexed content.

The plugin synchronizes public WordPress pages and posts. Drafts, private content, password-protected content and WooCommerce products are excluded. WP-Cron runs scheduled synchronization; configure a hosting scheduler on low-traffic sites so updates do not wait for a visitor.

An accepted update can still be waiting for indexing. Check its final status before using it to evaluate an answer.

Troubleshooting

Symptom Next step
Plugin repository displays 404 Sign in to GitHub and confirm repository access.
HTTPS or security-key error Check the public/admin URLs, sodium, and WordPress security keys.
Authorization failed or expired Start a new connection and complete it in the same WordPress login session.
Exchange fails Confirm that the service implements the Integration API version expected by the plugin.
Queue remains pending Check WP-Cron, project access and the queue's reported error.
Widget does not appear Check the selected widget and verified connection; clear page caches after changes.

For an application that is not using the WordPress plugin, use the public API instead.