5

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.

  • @rajeev-k-tomy what qualifies this question to be protected? It doesn't show a lot of interest – Robbie Averill Mar 10 '16 at 23:38
2

Not sure if this is the problem for you but I had a similar issue the other day.
My problem was actually 2 problems.

  1. The authorization url for admin actions should be ROOT/admin/oauth_authorize not ROOT/oauth/authorize like it is for guest or customer requests.
  2. An admin role should be created in the backend and at least an user must be assigned to it. For that go to System->Web Services->REST Roles click on Add Admin Role.Set the permissions and after the page reloads you should see a tab called Role Users. Click on Reset 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

  • Thanks, Marius.. Infact I have done the above steps already. But no luck. Even I have tested the scenario with Google Advanced REST Client plugin, Mozilla's RESTClient plugin. I got the same exception.. – Velu Jun 17 '14 at 14:25

protected by Rajeev K Tomy Apr 16 '15 at 5:21

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.