I recently upgraded to the latest version of WooCommerce 2.1, which includes the new RESTful API . I don't have much experience with cURL or RESTful APIs, but I thought I was playing.
My site is sergedenimes.com, and I have SSL installed on the server.
If I run curl https://sergedenimes.com/wc-api/v1, I get a nice long json output bit as follows:
{
"store":{
"name":"Serge DeNimes",
"description":"Original, Urban T-Shirts Of The Highest Quality by Oliver Proudlock",
"URL":"http:\/\/sergedenimes.com",
"wc_version":"2.1.2",
"routes":{
"\/":{
"supports":[
"HEAD",
"GET"
],
"meta":{
"self":"http:\/\/sergedenimes.com\/wc-api\/v1\/"
}
},
"\/customers":{ etc.....
This suggests that api itself is working. However, when I pass a request that uses authentication:
curl https://sergedenimes.com/wc-api/v1/orders -u my_key:my_secret
I get this in response:
{
"errors":[
{
"code":"woocommerce_api_authentication_error",
"message":"Consumer Key is missing"
}
]
}
Is my syntax correct? I set my key and secret under the WP administrator and passed the values, but it seems that I am not passing it with my request.
Any ideas?