WooCommerce REST API

Generate WooCommerce REST API credentials for Live Feed connections

Overview

If your source store doesn't have PrimeLink installed, you can use WooCommerce's built-in REST API to connect it to your destination store. This allows you to synchronize products from any standard WooCommerce store to your PrimeLink-enabled store.

WooCommerce REST API uses Consumer Key and Consumer Secret for authentication, which are generated in the WooCommerce admin panel.

Generating REST API Credentials

Step 1: Access REST API Settings

On your source WooCommerce store (the store you want to import from):

  1. Navigate to WooCommerce → Settings
  2. Click on the Advanced tab
  3. Click on REST API in the left menu

Step 2: Create a New API Key

  1. Click the Add Key button
  2. Fill in the key details:

Key Details

  • Description: Enter a descriptive name (e.g., "PrimeLink Live Feed Connection")
  • User: Select a WordPress user (preferably an admin user)
  • Permissions: Select Read (you only need read access for Live Feed)

Step 3: Generate Credentials

  1. Click Generate API Key
  2. WooCommerce will generate the Consumer Key and Consumer Secret
  3. These will be displayed immediately
⚠️ Important: Copy both the Consumer Key and Consumer Secret immediately. The Consumer Secret is only shown once and cannot be retrieved later. If you lose it, you'll need to generate a new key.

Step 4: Save Credentials

Copy both values to a secure location:

  • Consumer Key: A long alphanumeric string (starts with ck_)
  • Consumer Secret: A long alphanumeric string (starts with cs_)

You'll need both values when setting up the Live Feed connection in PrimeLink.

Using Credentials in PrimeLink

When setting up a Live Feed connection in PrimeLink:

  1. Go to PrimeLink → Live Feed → Feeds
  2. Click Add Feed
  3. Select Source Type: "WooCommerce REST API"
  4. Enter the source store URL
  5. Paste the Consumer Key in the Consumer Key field
  6. Paste the Consumer Secret in the Consumer Secret field
  7. Click Test Connection to verify
  8. Save the feed

Managing API Keys

Viewing Existing Keys

In WooCommerce → Settings → Advanced → REST API, you'll see a list of all API keys with:

  • Description
  • User
  • Permissions
  • Last access date
  • Actions (Revoke/Regenerate)

Revoking Keys

If you need to disable an API key:

  1. Find the key in the list
  2. Click Revoke
  3. Confirm the action
  4. The key will be immediately disabled
⚠️ Warning: Revoking a key will immediately stop all connections using it. Make sure to update your Live Feed connection in PrimeLink before revoking.

Security Best Practices

  • Use Read-only permissions: Live Feed only needs to read product data, not modify it
  • Create dedicated keys: Use separate keys for different connections
  • Regular rotation: Regenerate keys periodically for better security
  • Monitor usage: Check the "Last access" column to identify unused keys
  • Revoke unused keys: Delete keys that are no longer needed
  • Use HTTPS: Always use secure connections when transmitting credentials

Troubleshooting

Connection Failed

  • Verify Consumer Key and Secret are correct (no extra spaces)
  • Check that the user associated with the key has proper permissions
  • Ensure REST API is enabled in WooCommerce settings
  • Verify the source store URL is correct and accessible

403 Forbidden Error

  • Check that the key has "Read" permissions
  • Verify the user associated with the key is active
  • Check if any security plugins are blocking REST API access

No Products Returned

  • Verify products exist on the source store
  • Check that products are published (not draft)
  • Ensure the REST API endpoint is accessible

Next Steps

🔗 Live Feed Setup

Set up Live Feed connections using WooCommerce REST API credentials

Learn More →
🔑 API Keys

Learn about PrimeLink API keys for PrimeLink-to-PrimeLink connections

Learn More →