通过Postman使用Magento API通过Oauth 1.0进行授权

时间:2016-01-12 23:07:53

标签: php api magento oauth

我设置了一个测试Magento社区1.9,我正在尝试测试连接到Magento API的第三方应用程序。 Magento API在localhost XAMPP服务器上运行。我正在测试我与Postman的API连接。 我在Postman中运行以下连接:

  

http://nazariys-macbook-pro.local/magento-1/oauth/initiate?oauth_consumer_key=dc41f11be0efb0124c7f9fcf962cc2ac&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1452629068&oauth_nonce=puFenO&oauth_version=1.0&oauth_signature=vBqz9VyBc2zn6R3UDPg1tDylKqE=

我确实在管理面板中添加了自己并获得了密钥。

我的回答是:

oauth_problem=parameter_absent&oauth_parameters_absent=oauth_callback

我尝试添加不同的回调功能,例如localhost或http://httpbin.org/get,并继续遇到同样的问题。

我很抱歉,但我是Oauth和Magento的新手,所以我想问你是否可以让我知道我做错了什么。

1 个答案:

答案 0 :(得分:0)

将此代码段放在正文中:

oauth_callback="http://yourhost/oauth_admin.php"