Closed E-Mud closed 8 years ago
Don't post in multiple places... https://github.com/woothemes/wc-api-php/issues
Sorry I don't understand. This is the only place I posted this.
Edited: Forgot to add the Laravel version
I just discovered that if I do it with curl I get a different error:
curl http://localhost:8000/wp-json/wc/v1/products -u ck_792b5ebdea08a6edb6d3c415ac4f8e0bc7221553:cs_f56b03cbe7536cb4c0215f476d5a4e119dbc78ab
{"code":"woocommerce_rest_cannot_view","message":"Lo siento, no puedes listar los recursos.","data":{"status":401}}
I solved the issue. It was related to my local environment.
For the record: Actually I wasn't using a direct connection in the same machine, but links between docker containers. That means that the URL that my app was using and the URL of the wordpress system didn't match. The discovery of the host was obviously succesful. Problem is I forgot that the URL was used for encoding the signature so if they didn't match the signature wouldn't match.
So if you don't mind I'll close this issue.
Hello.
I've been trying to use this wrapper to connect to a wordpress + woocommerce page but I always get an authentication error. I followed the steps described here to generate the key and secret for the application.
PHP: v7.0.9 Laravel Framework: v5.2.41 WC-API-PHP: v1.1.1
Code:
Output:
Wordpress System:
What am I doing wrong or what did I miss? Thanks in advance