[WooCommerce] Error 401: Sorry You Are Not Allowed To Create Resources

This error will appear when a Scheduled Order fails to process.

What This Error Means

This error means that the WordPress Admin user who registered and connected the WooCommerce API to QPilot has been changed or deleted. Occasionally, security plugins can also cause this error.

How To Resolve This Error

A WordPress Administrator needs to reconnect your site's WooCommerce API to QPilot.

The Autoship Cloud powered by QPilot plugin makes this easy to do with the following steps:

  1. Log into your WordPress Site as an administrator and visit WP-Admin > Autoship Cloud > Settings
  2. Select "Disconnect"
  3. Follow the steps to Connect the WooCommerce API

After Resolving This Error

Any Scheduled Orders that failed for this issue should be retried as soon as possible to avoid disruption or confusion for your Autoship customers.

To retry a Scheduled Order, use the "Restart Processing" action or edit the Scheduled Order, set its status back to Active, and click "Update" (as Active Scheduled Orders with a past due Next Occurrence Date will be triggered to process).

Still Unresolved?  Update your API Keys Manually

If Disconnecting and Reconnecting is not successful in restoring your site's connection, you can also update your API keys manually.

  1. In WP-Admin go to WP-Admin > WooCommerce > Settings > Advanced > REST API
  2. Select "Add Key"
  3. Name your new API Key and ensure the key is:
    1. connected to a user with Administrator permissions
    2. enabled for Read/Write permissions
  4. Copy both the Consumer Key and Secret Key (you may want to open another browser tab for this step to make it easy to Copy + Paste)
    1. In your QPilot Merchant Account, edit the site you are connecting (see the Edit Site option by selecting the "three button icon" in the upper right of the site card)
    2. Paste the new Consumer Key and Secret Key
    3. Select "Update" to save your changes
  5. To confirm this was successful, you can visit WP-Admin > Autoship Cloud > Settings and select "Test Integration"
    1. If you receive a successful "200" response, the API key update worked.
    2. If not, please get in touch with support.

See this process in the screen recording below: