Reputation:
CORS .htaccess
header set Access-Control-Allow-Origin "*"
header set Access-Control-Allow-Headers "origin,content-type,user-agent, accept, x-r$"
header set Access-Control-Allow-Methods "PUT,GET,POST,DELETE,OPTIONS,HEAD"
API Request
http://192.168.1.125/badlapur/wp-json/wc/v2/orders?oauth_consumer_key=ck_fe1859072d41b36ed511ba6a4e31de75aac16516&oauth_nonce=I7DfkcQvMIST8aKnGqSEHk2NsCKTljWs&oauth_signature_method=HMAC-SHA256&oauth_timestamp=1515179933&oauth_version=1.0&oauth_signature=Ru3%2BDd1zz1ihRqGhbeoYasbLZkzNGZqtb5I61UJi1Kw%3D
Json Response
{
"code": "woocommerce_rest_authentication_error",
"message": "Invalid signature - provided signature does not match.",
"data": {
"status": 401
}
}
I am using wordpress with following plugins
I activated Settings->JSON API->Core & User I re-created consumer key & secret
But still not working, any way to solve?
Upvotes: 1
Views: 1303
Reputation:
Finally after researching on various issues from git came to a solution:
I used the 1st method, and it's work flawlessly!
Upvotes: 1