8000 Not working anymore · Issue #56 · woocommerce/wc-api-python · GitHub
[go: up one dir, main page]

Skip to content

Not working anymore #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Evert-Arends opened this issue Oct 3, 2020 · 5 comments
Closed

Not working anymore #56

Evert-Arends opened this issue Oct 3, 2020 · 5 comments

Comments

@Evert-Arends
Copy link
Contributor

Hello,

As of a few months this module does not seem to work anymore, I found the culprit, as it seems to work when I include this header:
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0'. This explains why CURL works, but python requests not anymore.

Best regards,

Evert

@freddie-freeloader
Copy link
freddie-freeloader commented Oct 8, 2020

I second this. 😞

I get 403 status code for print(wcapi.get("orders", params={"per_page": 20}).status_code).

@Evert-Arends
Copy link
Contributor Author

@freddie-freeloader If you want a temporary 8000 fix, you can check out my branch, where I fixed it in a minimal way.
https://github.com/Evert-Arends/wc-api-python

If you want the full fix check out my pr: #57

@freddie-freeloader
Copy link

@Evert-Arends Thank you for pointing that out! I forked your repository already but used the master branch. Dank u zeer! ☺️

@jasalt
Copy link
jasalt commented Nov 15, 2020

I was getting 401 authentication error with this but queries with the Postman/curl were working. Ended up simply using the Requests library with it's basic auth.

import requests
response = requests.get(API_URL,auth=(KEY,SECRET))  # verify=False  <- add if testing dev server with self signed ssl 
print(response.status_code)

This is basically what this wrapper library tries to help you do anyways while complicating things at the same time.. Hope the fix is on PIP soon, thank's.

@Evert-Arends
Copy link
Contributor Author

Fixed in merged pr #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0