【问题标题】:Magento REST API keeps returning "signature_invalid" errorMagento REST API 不断返回“signature_invalid”错误
【发布时间】:2017-10-24 10:16:45
【问题描述】:

我正在尝试使用 Firefox Rest 客户端扩展来测试我的 Magento REST API。我按照本指南进行操作,但在发出最终请求以接收访问令牌时不断收到“signature_invalid”错误。

指南:http://devdocs.magento.com/guides/m1x/api/rest/testing_rest_resources.html

我用于最终请求的 URL 是:

http://mymagento/oauth/token?oauth_callback=http://httpbin.org/get&oauth_token=99e48f7d46d3a2f8fef704865fe2f4e4&oauth_secret=eda948ee46250f335146f6f4c5f7d622&oauth_verifier=1d977f0b96f3ae07fff515c590ec6709

这些是读者:

OAuth oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
oauth_callback="http%3A%2F%2Fhttpbin.org%2Fget",
oauth_token="99e48f7d46d3a2f8fef704865fe2f4e4",
oauth_secret="eda948ee46250f335146f6f4c5f7d622",
oauth_verifier="1d977f0b96f3ae07fff515c590ec6709",
oauth_nonce="OmOzMMy2Z60m5sV", oauth_timestamp="1495611445",
oauth_consumer_key="abc77ce5a53e67333af04807dea1356b",
oauth_signature="tE6xzRXZIc4BPQ3Dxc80ddoitLg%3D"

nonce、时间戳和签名会在每个请求中自动刷新。

我正在使用 Magento CE 1.9.2.2。 我也尝试过 Postman,但该工具在每次请求时都会给我一个 nonce_used 错误,即使它是自动刷新的……权限已按照此处的说明正确设置:http://inchoo.net/magento/configure-magento-rest-and-oauth-settings/

在我想要接收访问令牌的最终请求之前,使用 Rest 客户端扩展一切正常。

【问题讨论】:

    标签: rest api magento oauth postman


    【解决方案1】:

    我找到了解决方案...本地浏览器缓存了 oauth 响应...

    【讨论】:

      猜你喜欢
      • 2016-12-21
      • 1970-01-01
      • 1970-01-01
      • 2013-07-21
      • 1970-01-01
      • 2013-01-06
      • 2011-12-30
      • 1970-01-01
      • 2020-11-05
      相关资源
      最近更新 更多