i have created AccessToken and AccessTokenSecret as mentioned in the Oauth Rest API Documentation and I am able to retrieve the products using GET Request. But when i try to Create a new product (POST Request) using Java, I am always getting "signature_invalid" from magento server.
{"messages":{"error":[{"code":401,"message":"oauth_problem=signature_invalid"}]}}
Here is the Request:
OAuth oauth_nonce="1332732890", oauth_version="1.0", oauth_consumer_key="402ce3406b6d69b74fe7a4b8652bcec1", oauth_signature_method="HMAC-SHA1", oauth_token="f12bbd4012d11f754c1aee4e372ff1db", oauth_timestamp="1402981865", oauth_signature="C6HSsBXzVJ6YahcX3rNzdXlyZuA="
Thanks in advance.
Best Answer
Not sure if this is the problem for you but I had a similar issue the other day.
My problem was actually 2 problems.
ROOT/admin/oauth_authorize
notROOT/oauth/authorize
like it is for guest or customer requests.System->Web Services->REST Roles
click onAdd Admin Role
.Set the permissions and after the page reloads you should see a tab calledRole Users
. Click onReset Search
and add at least one admin to the role. Save and try again.I hope that at least one of the points above solves your problem