【发布时间】:2013-01-25 03:29:19
【问题描述】:
当我们获取产品时,magento 中存在类似“无效的身份验证/错误请求(收到 403,预期的 HTTP/1.1 20X 或重定向)”的错误。 我的代码如下。
$resourceUrl = "http://localhost/magento/api/rest/products";
$oauthClient->fetch($resourceUrl, array(), 'GET', array('Content-Type' => 'application/json'));
$productsList = json_decode($oauthClient->getLastResponse());
我通过这个url完成了用户认证
http://www.magentocommerce.com/api/rest/authentication/oauth_authentication.html.
请解决我的问题..
【问题讨论】:
标签: php api magento oauth product