You can create WooCommerce REST API keys under WooCommerce > Settings > Advanced > REST API, then select Read, Write, or Read/Write access levels. We recommend giving each integration only the access it needs, using a dedicated WordPress user where practical.
That small choice protects your store when you connect reporting tools, inventory systems, or custom scripts. Start by choosing the appropriate access level, then generate your key and test the connection.
Key Takeaways
- Choose Read for integrations that only retrieve data. Write access allows changes and deletions.
- A key's access setting works alongside its assigned WordPress user's capabilities.
- Keep credentials private, use HTTPS, and revoke keys when an integration no longer needs access.
Choose What WooCommerce REST API Keys Can Access

Match Permissions to the Job
The key permission setting controls which request methods an integration can use.
| Permission | Allowed actions | Suitable purpose |
|---|---|---|
| Read | Retrieve data with GET | Reporting and exports |
| Write | Create, update, and delete data | Sending changes into your store |
| Read/Write | Retrieve and change data | Two-way synchronization |
Start with the smallest permission set that supports the integration. A reporting connection doesn't need permission to delete products.
Write-only access also doesn't support a normal GET test. Use a Read key for the product-reading test below. Test write operations separately on staging.
Keep User Capabilities in the Picture
Every key belongs to a WordPress user. That user's capabilities still apply, as explained in WooCommerce's authentication guidance.
Assigning Read/Write doesn't give a Subscriber the management capabilities of an Administrator. We recommend a dedicated integration account with only the capabilities its endpoints require.
There's another limit worth understanding: standard key settings don't offer per-endpoint scopes. Read doesn't mean "products only." Access depends on both the key setting and the user's capabilities.
Read-only access prevents changes, but it can still expose sensitive information the assigned user is permitted to retrieve.
Create Your Key in WooCommerce Settings
Sign in with an account that can manage WooCommerce settings. Follow the official key-generation instructions:
- Open WooCommerce > Settings > Advanced > REST API.
- Select Add Key, or Create an API key if that's the option displayed.
- Enter a description that identifies the integration and its purpose.
- Choose the WordPress user, then select Read, Write, or Read/Write.
- Click Generate API Key and save the Consumer Key and Consumer Secret securely.
Use a description you'll recognize later. A service name and purpose make cleanup easier than a label such as "API key."
The Consumer Secret is displayed when the key is generated. Save it before leaving that screen. If it's lost, generate a replacement rather than trying to recover it.
Enter both values in the integration's designated credential fields or protected server configuration. Don't send them or store them in a public or shared location.
We also recommend separate keys for separate integrations. You can then revoke one connection without interrupting every service linked to your store.
Test the Connection in Postman
A successful test gives you a clear starting point. Confirm authentication works before adding filters, custom code, or synchronization rules.
Send a Read-Only Product Request
Create a request and select GET. Enter your store's HTTPS address followed by /wp-json/wc/v3/products, a wc/v3 endpoint for product data.
Under Authorization, choose Basic Auth. Enter the Consumer Key as the username and the Consumer Secret as the password.
Select Send. A successful request normally returns 200 OK and a JSON array containing product data. An empty array, [], can be valid when no products match.
Keep this first request simple. Extra query parameters make it harder to separate authentication problems from filtering mistakes.
WooCommerce also supports OAuth 1.0a as an alternative request-signing method. A client configured for OAuth signs requests with the consumer key and secret.
Understand the Basic Auth Header
Basic Auth combines the credentials as consumer_key:consumer_secret, Base64-encodes that string, and sends it in an Authorization: Basic header.
For server-side Node.js code, this generates the header using credentials stored in environment variables:
const credentials =
`${process.env.WC_CONSUMER_KEY}:${process.env.WC_CONSUMER_SECRET}`;
const authorization =
`Basic ${Buffer.from(credentials, "utf8").toString("base64")}`;
Pass authorization as the value of your HTTP client's Authorization header.
Base64 isn't encryption. HTTPS protects the connection. Never put these credentials in browser JavaScript, public repositories, screenshots, or shared collections.
Understand Endpoints Before Allowing Changes
Among WooCommerce APIs, the WC REST API extends the WordPress REST API. It exchanges JSON data for resources including products, orders, customers, coupons, and shipping zones.
Match the Method to the Action
For products, orders, customers, and coupons, the standard operations follow this pattern. The API endpoints below use HTTP methods to identify each action.
| Method | Route pattern | Action |
|---|---|---|
| GET | /wp-json/wc/v3/products | List records |
| POST | /wp-json/wc/v3/products | Create a record |
| PUT | /wp-json/wc/v3/products/{id} | Update a record |
| DELETE | /wp-json/wc/v3/products/{id} | Delete a record |
Replace products with orders, customers, or coupons for those resources. Request bodies and deletion behavior vary by endpoint.
WordPress routing depends on Pretty permalinks. If an API route returns a 404, see the later 404 troubleshooting section.
Separate Storefront Access and Webhooks
The WooCommerce Store API provides public, customer-facing product, cart, and checkout endpoints. It isn't a substitute for authenticated access to private store-management data.
Webhooks work in the opposite direction to a normal API request. When an event occurs, such as a new order, WooCommerce can POST order details to an external service.
If notifications stop arriving, our guide to troubleshooting WooCommerce webhook delivery covers that separate connection.
Fix Authentication and Route Errors

Record the failing method, endpoint, status code, and response body before changing settings. The WooCommerce REST API reference describes response codes and authentication behavior.
Investigate 401 and 403 Responses
A 401 Unauthorized response means authentication or access requirements weren't satisfied. Incorrect credentials and insufficient access for the assigned user are documented causes.
Confirm you're using the Consumer Key and Consumer Secret from the same key pair. These fields take WooCommerce credentials, not your WordPress login password or an Application Password.
A 403 Forbidden response indicates that access was refused. Examine the response message and the security layer producing it.
Your request may be blocked before WooCommerce receives it. A security plugin, proxy, hosting firewall, or server rule can interfere. Also investigate whether the Authorization header reaches WordPress.
Don't grant administrator access simply to silence an error. Identify the missing permission or blocking rule first.
Investigate 404 Responses
404 Errors can also result from an incorrect endpoint, a missing record, or a server rewrite problem.
WooCommerce documents a requirement for pretty permalinks. Open Settings > Permalinks, select an option other than Plain, and click Save Changes.
Pretty permalinks are required, but enabling them won't fix every 404. If the whole /wp-json/ route fails, investigate WordPress routing. If only one record fails, examine its resource type and ID.
Diagnose SSL and Server Problems Safely
Keep HTTPS Consistent
Use your store's preferred HTTPS hostname throughout the integration. Redirects between HTTP and HTTPS, or between different hostnames, complicate diagnosis.
Qualys SSL Labs' SSL Server Test can inspect your site's public SSL certificate configuration. Keep certificate validation enabled in your API client, and verify the SSL certificate is valid for your chosen hostname. Disabling validation trades a visible connection problem for weaker protection.
A protected staging site can also introduce another authentication layer. Account for that layer rather than assuming WooCommerce rejected the key.
Isolate a 500 Error Without Disrupting Sales
A 500 Internal Server Error means the server failed while processing the request. For recurring 500 Internal Server Errors, match each failure's timestamp to the PHP error log.
Back up the site before making changes. On staging, establish a WooCommerce-only baseline to check for Plugin Conflicts. Retest, then restore extensions one at a time. If 500 Internal Server Errors persist after restoring extensions, check server resources and recent server configuration changes.
Health Check & Troubleshooting offers session-based testing through Tools > Site Health > Troubleshooting. However, an external API request won't automatically share your logged-in troubleshooting session. Use staging for dependable external-request testing.
Store, Rotate, and Revoke Credentials
Treat both key values as credentials. Store them in a secrets manager or protected server configuration, and redact them from logs before sharing diagnostic information.
To remove access, return to WooCommerce > Settings > Advanced > REST API, open the relevant key, and choose Revoke API Key.
For routine rotation, generate a replacement with the same necessary access. Update the integration, test it, then revoke the old key. If credentials have been exposed, revoke them immediately and investigate their use.
We recommend reviewing keys whenever an employee leaves, an agency handover finishes, or a service is disconnected. Unused access has no upside.
Your hosting should fit the workload behind those connections, too. ZADiC WordPress hosting starts at $9.99/month. For projects needing more server control, our flexible VPS options offer another path. Choose around your store's requirements rather than paying for a one-size-fits-all setup.
Frequently Asked Questions
Can a Read Key Change Products or Orders?
No. Read permissions allow retrieval, not creation, updates, or deletion. Those changes require Write or Read/Write permissions and sufficient capabilities for the assigned user.
If the integration only produces reports, we recommend keeping it read-only.
Can Existing Keys Be Found in WordPress?
Yes. Open WooCommerce > Settings > Advanced > REST API to manage existing keys and their details.
The Consumer Secret isn't displayed again after generation. If you haven't stored it securely, create a replacement, update the integration, and revoke the old key.
Connect Your Store With Less Access
A reliable integration starts with limited permissions, a suitable WordPress user, and a successful authenticated test. Keep credentials private and remove access when its job is finished.
Start with Read when retrieval is enough. Add write access only when the integration needs to change your store. You get a working connection without handing over more control than necessary.




