How to create a WooCommerce REST API key for Zendesk
By Jake Marsh · Updated
To connect WooCommerce to Zendesk, create a REST API key in WordPress under WooCommerce > Settings > Advanced > REST API > Add key, assign it to a shop manager or administrator, choose Read or Read/Write, and click Generate API key. Copy the consumer key (ck_...) and consumer secret (cs_...) right away, because the secret is shown only once, then paste both into Basketwell's settings in Zendesk.
Steps
- Open the REST API screen. In WordPress, go to WooCommerce > Settings > Advanced > REST API and click Add key.
- Fill in the key.
| Field | What to enter |
|---|---|
| Description | Basketwell for Zendesk |
| User | A shop manager or administrator. A dedicated user, such as "zendesk-support", makes the store's order notes and logs easier to read. |
| Permissions | Read for a view-only sidebar, Read/Write to allow refunds, status changes, order emails and order notes. |
- Generate the key. Click Generate API key and copy both values now.
- Paste them into Zendesk. In Basketwell's settings, enter the Store domain (host name only, such as
shop.example.com), the WordPress path if WordPress lives in a sub-folder (such as/shop), and the Consumer key and Consumer secret. Zendesk stores the secret as a secure setting that never reaches agents' browsers. - Test it. Open a ticket from someone who has ordered. Their orders should appear in the sidebar.
Read or Read/Write?
| What agents can do | Permission needed |
|---|---|
| See orders, the customer, lifetime value, tracking and order notes, look up orders | Read |
| See which order emails can be resent | Read (WooCommerce 9.8+) |
| Refund, change status, resend an order email, add an order note | Read/Write |
Start with Read if you only want agents to see orders. You can edit the key to Read/Write later without making a new one.
Store requirements that trip people up
- HTTPS with a valid certificate. WooCommerce only accepts the key and secret over HTTPS, and Zendesk requires a complete certificate chain.
- Permalinks other than Plain. Under WordPress > Settings > Permalinks, any choice but Plain makes the REST API answer at
/wp-json/. - Zendesk must be able to reach the store. Requests come from Zendesk's servers, not the agent's browser. If Cloudflare, a security plugin or the host's firewall blocks unknown servers, allow Zendesk's IP ranges (see Zendesk's firewall article) or the
/wp-json/wc/path. - The Authorization header must reach WordPress. Some Apache setups running PHP as CGI or FastCGI drop it, and WooCommerce then answers as if no key was sent. Add this line to
.htaccessabove the WordPress rules, or ask your host to pass the header through:
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
Error messages and fixes
| Message in the sidebar | Fix |
|---|---|
| "did not accept the consumer key and secret" | Generate a new key and paste both values again. |
| "answered as if no key was sent" | The server drops the Authorization header (above), or the key's user isn't a shop manager or administrator. |
| "A firewall or security plugin ... blocked Zendesk" | Allow Zendesk's IP ranges or the /wp-json/wc/ path. |
| "REST API was not found at ..." | Check the store domain, the WordPress path and the permalink setting. |
| "The store domain must be the host name only" | Remove https://, any path and any trailing slash. |
What it costs
Basketwell for WooCommerce is $15 a month per Zendesk account, for every agent, billed monthly by Zendesk, with a 14-day free trial. Nothing is installed in WordPress. The documentation has every setting.
Basketwell for WooCommerce
The requester's WooCommerce orders on the ticket: refund, change status, resend emails, all logged. $15 a month per Zendesk account.
Questions
Do I need a WordPress plugin for Zendesk?
Not for Basketwell. It talks to WooCommerce's built-in REST API with the key you create, so nothing is installed in WordPress.
I lost the consumer secret. Can I see it again?
No. WooCommerce shows the secret only once. Revoke the old key and generate a new one.
Can I connect more than one store?
Yes, up to three. Each store gets its own domain and key, and can be mapped to Zendesk brands.
What should I do when I stop using the app?
Uninstall it in Zendesk, which deletes the stored keys, then revoke the key in WooCommerce > Settings > Advanced > REST API.
More Basketwell for WooCommerce guides
More Zendesk guides
- How to add a PrestaShop tracking number from a Zendesk ticket (Caddywell for PrestaShop)
- How to cancel a Paddle subscription from a Zendesk ticket (Canoewell)
- How to change a HubSpot lifecycle stage from Zendesk (Clientwell)