Platform
Chatbot Builder Bulk Messaging Team Inbox Mini CRM API & Webhooks AI Integration WhatsApp Flows
Industries
E-commerce & D2C Real Estate Education Healthcare Finance & BFSI Logistics Hospitality Retail
Integrations
Learn
Learning Hub Help & Docs Connect Guides Automation Codex Blog Message Templates
Pricing Get Started →
HomeConnect › Connect WordPress to WhatsApp
WordPress Integration Guide · Content API

Connect WordPress to WhatsApp

Pull live content from your WordPress site into a WhatsApp chatbot. Fetch posts, pages, property listings, event details, or any custom post type and share them with customers in real time, powered by the WordPress REST API and Application Password authentication.

Published 22 June 2026  ·  8 min read  ·  Content API

Before following this guide, read the External API Request step foundation guide. It covers every field in the step interface so this guide can focus on WordPress-specific values.

What you can build with this

The WordPress REST API is a content API, not an orders API. The use cases suited to it are:

Use caseWordPress endpointWhat the bot does
Latest blog post botGET /wp-json/wp/v2/posts?per_page=1Customer asks 'latest news' and the bot fetches and shares your newest post title, excerpt, and link.
Property listing botGET /wp-json/wp/v2/properties/{id}Customer sends a listing ID; bot returns the property details from a WP Real Estate or custom post type.
Event details botGET /wp-json/tribe/v1/events/{id}Bot fetches event date, venue, and ticket link from The Events Calendar plugin.
FAQ / knowledge botGET /wp-json/wp/v2/pages/{id}Bot fetches a specific WordPress page and shares its excerpt or content.
Product catalogueGET /wp-json/wc/v3/products/{id}Bot fetches WooCommerce product description, price, and stock status (see WooCommerce guide for orders).

For WooCommerce ORDER lookups, use our dedicated WooCommerce guide which covers the consumer key/secret auth system.

WordPress REST API requires pretty permalinks

The REST API endpoint /wp-json/ only works when WordPress pretty permalinks are enabled. Go to Settings > Permalinks in your WordPress admin and choose any option other than Plain.

Step 1: Generate a WordPress Application Password

WordPress Application Passwords are built into WordPress core since version 5.6. No plugin needed. They use HTTP Basic Auth with your WordPress username and the generated 24-character token.

1
In WordPress admin, go to Users > Your Profile. Scroll to the Application Passwords section near the bottom.
2
In the "New Application Password Name" field, enter a name like "WA.Expert Bot". Click Add New Application Password.
3
WordPress generates a 24-character password in the format xxxx xxxx xxxx xxxx xxxx xxxx. Copy it immediately.
4
Note your WordPress username (shown at the top of the Profile page). This is your login username, not your display name.
Application Password shown once only

WordPress shows the generated token only once. If you close the page without copying it, you must delete it and generate a new one. The spaces in the 24-character string can be included or removed. Either format works in the Authorization header.

Use a dedicated API user, not your admin account

Create a separate WordPress user for API integrations (e.g. role: Author or Editor). Generate the Application Password for that user. If the token is ever compromised, you revoke one token without affecting your admin access.

Official docs

WordPress Application Passwords: developer.wordpress.org/rest-api/using-the-rest-api/authentication

Step 2: Fill in the External API Request step

The example below fetches your latest blog post. In your WA.Expert chatbot flow, add an External API Request step with these values:

External API Request Step — WA.Expert
Select Method
GET
Request URL
https://yoursite.com/wp-json/wp/v2/posts?per_page=1&orderby=date&order=desc
Select Auth Type
Basic Auth
Username: your WordPress login username | Password: the 24-character Application Password
Header Parameters
Content-Typeapplication/json
Select Body Type
None (GET requests carry no body)
Choose Response Type
JSON

Field-by-field breakdown

FieldValueNotes
Select MethodGETReading existing content.
Request URLhttps://yoursite.com/wp-json/wp/v2/posts?per_page=1Replace yoursite.com with your domain. per_page=1 returns only the latest post.
Select Auth TypeBasic AuthWordPress Application Passwords use HTTP Basic Auth. WA.Expert handles the Base64 encoding automatically.
Username (Basic Auth)your-wordpress-usernameYour WordPress login username. Not your display name or email.
Password (Basic Auth)xxxx xxxx xxxx xxxx xxxx xxxxThe 24-character Application Password from Step 1. Spaces can be included or removed.
Content-Typeapplication/jsonStandard header for WordPress REST API.
Select Body TypeNoneGET requests carry no body.
Choose Response TypeJSONWordPress returns an array of post objects.

Common endpoint patterns

What you wantEndpoint URL
Latest posthttps://yoursite.com/wp-json/wp/v2/posts?per_page=1
Specific post by IDhttps://yoursite.com/wp-json/wp/v2/posts/123
Specific page by IDhttps://yoursite.com/wp-json/wp/v2/pages/45
Search postshttps://yoursite.com/wp-json/wp/v2/posts?search=keyword
Custom post type by IDhttps://yoursite.com/wp-json/wp/v2/properties/67
WooCommerce producthttps://yoursite.com/wp-json/wc/v3/products/89

Custom post type slugs vary by plugin. Replace 'properties' with whatever the plugin registers. Check with the plugin documentation.

Step 3: Map the response to WhatsApp variables

A WordPress post response (single post from per_page=1) looks like this:

WordPress REST API — GET /wp/v2/posts response (abbreviated)
[
  {
    "id": 123,
    "date": "2026-06-20T10:30:00",
    "title": {
      "rendered": "How WhatsApp API Is Changing Indian Retail"
    },
    "excerpt": {
      "rendered": "

Retailers across India are turning to WhatsApp as their primary customer channel. Here is what the numbers show.

" }, "link": "https://yoursite.com/whatsapp-api-indian-retail/", "author": 1, "categories": [5], "status": "publish" } ]
Response is an array: reference fields with [0]

The posts endpoint returns an array even when per_page=1. Map your variables using [0] notation: [0].title.rendered for the title, [0].excerpt.rendered for the excerpt, [0].link for the URL.

Map these response paths to variables in the External API Request step:

Variable nameResponse pathExample value
post_title[0].title.renderedHow WhatsApp API Is Changing Indian Retail
post_excerpt[0].excerpt.rendered

Retailers across India are...

(contains HTML tags: strip or use as-is)
post_url[0].linkhttps://yoursite.com/whatsapp-api-indian-retail/
post_date[0].date2026-06-20T10:30:00
post_id[0].id123

The excerpt field contains HTML tags from WordPress. Most WhatsApp replies work fine with plain text only. Use the title and link and skip the excerpt or handle the HTML on the platform side.

Keep the WhatsApp reply in the free service window

If the customer messaged you first within the last 24 hours, your reply is a free service conversation. Send the content in that window. For proactive content broadcasts, use an approved Marketing template.

Worked example: latest post chatbot

Chatbot flow — WordPress latest post
Customer sends keyword: "latest" or "news"

Bot keyword trigger fires.

External API Request step:
GET https://yoursite.com/wp-json/wp/v2/posts?per_page=1&orderby=date&order=desc
Auth: Basic your-username:your-app-password

Response mapped:
post_title   = "How WhatsApp API Is Changing Indian Retail"
post_url     = "https://yoursite.com/whatsapp-api-indian-retail/"
post_date    = "2026-06-20T10:30:00"

Bot replies:
"Our latest article:

*How WhatsApp API Is Changing Indian Retail*
Published: 20 June 2026

Read it here: https://yoursite.com/whatsapp-api-indian-retail/

Reply SUBSCRIBE to get articles in WhatsApp."

Troubleshooting

SymptomLikely causeFix
401 UnauthorizedWrong username or Application PasswordCheck you are using the WordPress login username (not display name or email). Regenerate the Application Password if unsure.
404 on /wp-json/Pretty permalinks disabledGo to WordPress Settings > Permalinks, choose any option other than Plain, save.
403 ForbiddenUser role lacks permission for the endpointUse a user with Editor or higher role. Some endpoints are restricted to certain roles.
Empty array []No posts match the queryCheck the per_page and status parameters. By default, only published posts are returned (status=publish).
HTML tags in excerptWordPress includes formatting in excerptEither accept the HTML or add &_fields=title,link,date to the URL to skip excerpt entirely.
Application Passwords section missingWordPress site is multisite or using a security plugin that disabled itOn multisite installs, Application Passwords may need to be enabled via code or a plugin. Wordfence and iThemes Security can disable the feature.

Common questions

What is a WordPress Application Password?
+
A 24-character token built into WordPress since 5.6. It lets external services authenticate with the REST API using HTTP Basic Auth, without exposing your main WordPress login password. Each token can be revoked independently.
Where do I generate a WordPress Application Password?
+
Users > Your Profile > Application Passwords. Enter a name, click Add New Application Password, copy the 24-character string before leaving the page.
What WordPress role should the user have?
+
Subscriber or Author is sufficient for reading posts and pages. Use a dedicated API user, not your admin account, so you can revoke the token without disrupting admin access.
Does this work for WooCommerce orders too?
+
Yes, Application Passwords work with WooCommerce REST API endpoints using the same Basic Auth format. However, WooCommerce also has its own Consumer Key/Secret system. See our WooCommerce guide for the full order-lookup walkthrough.
What use cases does this enable?
+
Latest blog post bot, property listing bot, event details bot, FAQ bot that reads WordPress pages, product catalogue sharing. For order lookups, use the dedicated WooCommerce guide.
Does this incur extra WA.Expert charges?
+
The External API Request step counts as one automation action per call. On the Complete plan this is included. On Starter, extra action packs apply from Rs. 49 per 1,000 actions.

Build your WordPress content bot today

Free trial, no credit card required. And if you ever get stuck, we are the only platform in India that answers you live on WhatsApp.

Start Free Trial → Book a Demo
1