How to create a WooCommerce read-only API key, and revoke it

The Pullsy engineering teamChecked November 2026. How we check

In short

In WordPress, open WooCommerce, Settings, Advanced, REST API, choose Add key, pick a user who can read orders, set Permissions to Read and generate it. Copy the secret straight away: it's shown once. Read blocks every change, but it still reads customer data, so revoke the key when the work ends.

A store has no agency role to hand out and no partner screen. What it has is an API key, which a store administrator creates and which lives on the store's own server. There's no platform in the middle to review the app or list who's connected, so the choices you make while creating the key are most of your protection. The steps below were read at WooCommerce's documentation in November 2026, and where its docs stop we've read its source code.

How do you create a Read key in WooCommerce?

A store administrator creates it in the WordPress admin, under WooCommerce's advanced settings. It takes about a minute and gives you two values to copy: a consumer key starting ck_ and a consumer secret starting cs_. These are WooCommerce's steps as of November 2026. Its pages label the tab both REST API and REST API keys.

  1. Go to WooCommerce, Settings, Advanced, REST API.
  2. Select Add key (Create an API key if the store has none yet).
  3. Enter a description that says what the key is for, such as the agency and the tool.
  4. Choose the WordPress user the key belongs to.
  5. Set Permissions to Read.
  6. Select Generate API key.
  7. Copy the consumer key and consumer secret before leaving the page.

The secret is shown only once. Leave the page without copying it and you'll need a new key. Note that one of WooCommerce's own developer guides walks you through choosing read/write, because that guide assumes you're building something that changes data. For reporting, Read is the setting you want.

One prerequisite trips up older stores: WordPress permalinks can't be set to Plain, because the REST API doesn't work on default permalinks. Check Settings, Permalinks first. Any option other than Plain will do, and changing it on a live store can alter public addresses, so talk to whoever runs the site before you touch it.

Who should create the key, and under which WordPress user?

The client's store administrator should create it, in their own admin. Don't ask for a WordPress login so you can do it for them. The user chosen on the form matters more than it looks, since the key can reach only what that user can reach, and the key stops working if the user is deleted. WooCommerce says keys aren't transferred to another user.

UserWill it read orders?Our view
An administratorYesWorks, and it's what many stores pick. Risky if tied to a person who may leave, since deleting that user kills the key
A shop managerYes. WooCommerce gives the role access to orders and customersA sensible choice, and less broad than an administrator
A dedicated shop manager user, named for the purposeYesOur preference. Nobody leaves the company and takes it with them
A customer or subscriberNoRequests come back refused. WooCommerce's troubleshooting starts here for a 401, and in our connector a key whose user can't read orders gets a 403
Which WordPress user to choose for a reporting key.

Make one key per tool or agency. WooCommerce allows any number of keys on a store, so there's no reason to share one. Then revoking access for one party doesn't break another, and the description column tells the next administrator who each one was for.

What does Read block, and what can it still see?

Read blocks every change: WooCommerce's code refuses any request other than reads for a key without write permission. But it doesn't limit what can be read. A Read key reaches whatever its WordPress user can see through the API, and for an administrator or shop manager that includes orders with customers' names, emails and addresses. It's a read-only key. It isn't a reporting-only key.

WooCommerce's authentication code answers a write request from a Read key with a 401 saying the key doesn't have write permissions, so the key can't change the store. It has no narrower setting: a Read key can still fetch customer names and addresses on orders. WooCommerce's own settings docs tell merchants to create and use keys with caution.

So what a vendor does with the key matters, and it's fair for a client to ask. Here's the answer for Pullsy's WooCommerce connection. Every request names its fields, so the order response never carries the billing or shipping address, or the customer's name, phone, note or IP. Line item metadata, where personalisation text such as an engraving can sit, and refund reasons are dropped on arrival.

The one personal field we do read is the billing email. We turn it into a keyed hash in memory, and the address is never written to a table or a log. Without that, a guest who buys twice would count as two new customers, whereas WooCommerce Analytics treats them as one buyer by email. The hash is keyed per store and can't be tested against a guessed address without our secret, so one person's orders at two stores can't be joined. If your client's rules don't allow even that, say so before you connect.

How do you check the key is really read-only?

Look at the Permissions column in the store's key list. It's the only reliable check, because WooCommerce doesn't expose a key's permission over its API, so a tool can't verify it for you. Pullsy can't tell a Read key from a Read/Write key either. We only ever send reads, and the connect form asks for Read and says why. The client's own list is the record.

To confirm the key works, make one harmless read. This is the request our connector uses to prove a key, and it returns the store's currency. Replace the placeholders, and clear it from your shell history afterwards, since the secret is in the command.

A read-only check against a placeholder store
curl -u ck_your_key:cs_your_secret \
  https://shop.example.com/wp-json/wc/v3/data/currencies/current

Don't test a key by trying to write with it. If the key turns out to be Read/Write, your test has just changed the client's store. The same list also has a Last access column, which WooCommerce updates as the key is used. It's a handy way to tell a live key from a forgotten one at your next review.

Why does a correct key still get refused?

Most refusals come from the server around WooCommerce or from the user behind the key, not from the key itself. WordPress is also someone's own hosting, so the answers vary by store in a way a hosted platform's don't. This table covers what WooCommerce documents, plus what we built our connector to catch.

What you seeLikely causeFix
401 UnauthorizedWrong key or secret, or a user without accessCheck the pair, check the user, and generate a new key if unsure
Consumer key is missingThe server isn't passing the Authorization header, which is known on some FastCGI setupsFix the server if you can. WooCommerce allows query string parameters as a fallback, which puts the secret in the store's access log
404 on /wp-json/Permalinks set to Plain, or the REST API is blockedChange the permalinks, or ask the host or security plugin
429 or a block pageThe host or a firewall in front of it is limiting requestsWooCommerce sets no REST limit of its own, so ask the host
Pullsy: not a WooCommerce storeThe site's /wp-json/ index doesn't list wc/v3Enter the right address, and check the REST API isn't switched off
Pullsy: refused as not HTTPSThe store's own home address isn't HTTPS, or it uses a port other than 443 or an IP addressServe the store on HTTPS under its domain name
Pullsy: redirectedThe address entered redirects, for example to www. We don't follow redirects, since a store could use one to point our servers elsewhereEnter the address named in the error
Common refusals. The last three rows are Pullsy's own rules; WooCommerce itself allows HTTP while recommending HTTPS.

A store in a subfolder is fine: example.com/shop is kept as entered, and pasting a wp-admin address is trimmed back to the site. Use a stable address, since it becomes the store's identity in Pullsy, and only one connection can hold that store at a time.

How do you revoke a WooCommerce key when the work ends?

A store administrator revokes it from the same screen it was created on. It has to happen there, because no outside system can do it: a tool can delete its own copy of a key, but WooCommerce has no API call to revoke one. So disconnecting a store in Pullsy leaves the key valid on the store until someone removes it. We tell the person disconnecting exactly that.

  1. Go to WooCommerce, Settings, Advanced, REST API.
  2. Find the key by its description, and check the Permissions and Last access columns.
  3. Hover over the key and select **Revoke**, or tick several and use the Revoke bulk action.

WooCommerce's documentation mentions only the Revoke link on the key's own screen, and we took the row and bulk actions from its source code, so your version's screen may differ slightly. Deleting the WordPress user also ends the key. After revoking, the next request gets a 401, and Pullsy marks the connection as needing a reconnect. Reconnecting means pasting a new key. Add this to your offboarding checklist, since nothing will prompt the client to do it.

How should an agency ask a client for the key?

Avoid having the secret pass through you at all. Email and chat keep it indefinitely, and you don't need to know it to report on the store. If you use a tool, have the client paste it straight into that tool. If you have to receive it, use a password manager's sharing feature, and have the client revoke and replace it if it ever lands in a mail thread.

A Pullsy connection link does the first of those. The client opens the link, sees who's asking and what's read, and follows three steps on the page: create a Read key, paste the address and key, then connect. The key goes from the client's own admin to Pullsy, you never see it, and the client doesn't need a Pullsy account. One link makes one connection, and it's spent when it's used.

WooCommerce also has its own authentication endpoint, which shows the merchant an approval screen and sends a fresh key to the app, with no copying. Pullsy doesn't use it today, as it was simpler to ship pasted keys first, so if avoiding paste matters to a client, that's a real point for any tool that does. The security checklist covers where to keep the key.

Questions people ask

Can a WooCommerce Read key change orders or products?

No. WooCommerce's authentication code allows only read requests from a Read key, and answers anything else with a 401 saying the key doesn't have write permissions. It can still read everything its WordPress user can reach through the API, including customer details on orders, so treat it as sensitive.

I lost the consumer secret. Can I view it again?

No. WooCommerce shows the consumer secret only once, when the key is generated. Viewing the key later shows a truncated key and hides the secret. Generate a new key with Read permission, put it into the tool that needs it, and then revoke the old one so it isn't left behind.

What happens to the key if the WordPress user who created it leaves?

It depends on what happens to the account. If the WordPress user the key belongs to is deleted, WooCommerce says the key stops working, and it isn't transferred to anyone. That's why a dedicated user for reporting is more dependable than a staff member's own login, whose account may be removed without anyone remembering the key.

Does a WooCommerce API key expire?

We didn't find an expiry setting in WooCommerce's docs, and the docs describe only two ways a key ends: revoking it, or deleting its user. So plan as if a forgotten key stays valid. Review the key list at least yearly, using the Last access column to spot keys nobody is using.

How often does Pullsy read a WooCommerce store?

Every three hours by default, one request at a time, since a store is somebody's own hosting and not an API built for polling. The first read covers about 400 days of orders. WooCommerce sets no REST rate limit of its own, so any limit you meet is your host's or firewall's.

Sources

  1. WooCommerce: REST API documentation: Key generation steps, permission options, the secret shown once, and permalinks
  2. WooCommerce: REST API developer guide: Choosing a user, 401 and Consumer key is missing troubleshooting, and permalinks
  3. WooCommerce: REST API reference: Deleted users' keys stop working, HTTPS recommended, and the authentication endpoint
  4. WooCommerce: advanced settings: Where REST API keys live, and the advice to create and use keys with caution
  5. WooCommerce: roles and capabilities: What the Shop Manager and Customer roles can reach
  6. WooCommerce source: REST authentication: A key without the needed permission gets a 401 naming read or write
  7. WooCommerce source: API keys table: The key list's Permissions and Last access columns and its Revoke actions

See your own clients' numbers in Pullsy

Create a workspace, send a client a connection link, and read what comes back. Fourteen days with one data source and one account, no card.