question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with authentication consumer key or consumer secret invalid

See original GitHub issue

I’m creating credentials using the endpoint /wc-auth/v1/authorize with scope=read_write most times the consumer key and secret that I get are valid, but a couple of times I get consumer key or consumer secrets that are invalid when I try to use them later in code like this:

wcapi = API(
    url=  shop_url,
    consumer_key= key,
    consumer_secret= secret
)
response = wcapi.get("orders?page=1")
# Then response.text is {"errors":[{"code":"woocommerce_api_authentication_error","message":"Consumer Secret is invalid"}]}
#  or {"errors":[{"code":"woocommerce_api_authentication_error","message":"Consumer Key is invalid"}]}

Has this issue been detected yet? Is it related to the python wrapper or woocommerce plugin?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
claudiosanchescommented, Feb 16, 2016

Yes, of course, since can be an error in the nonce, here:

https://github.com/woothemes/wc-api-python/blob/master/woocommerce/oauth.py#L53-L57

0reactions
angelleyecommented, Sep 14, 2017

@claudiosanches, I’m actually running into this now. For some reason when I use http:// in the store_url it’s working fine, but when I use https:// it’s telling me the secret is invalid.

You mentioned this means there’s a problem at the server. Can you elaborate on that? I’m not sure what to tell my server guy…??

Read more comments on GitHub >

github_iconTop Results From Across the Web

Zapier 4.0 Consumer Key & Secret Not Working - Gravity Forms
I've copied the Consumer Key & Secret directly from Gravity Forms, but it still won't connect when I try to authenticate it in...
Read more >
"Invalid client ID or secret" error when connecting to OAuth ...
Describes the cause of "Invalid client ID or secret" error when connecting to Precisely's OAuth Token Service This can be caused by an...
Read more >
Cannot find consumer key and consumer secret to connect ...
I finally solved my problem. I managed to create a new app, and I noticed that consumer key and secret and displayed after...
Read more >
What do I do if my consumer key is invalid? - Printful Help Center
Check if Consumer Key and Consumer Secret in your Woo admin panel under WooCommerce → Settings → API → Keys/Apps match Identity and...
Read more >
or user locked out.” while trying to connect to Salesforce from ...
... Failed: Invalid Refresh Token , Consumer Key , Consumer Secret; ... ​This issue happens, when the user selects Connection Type as OAuth ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found