magento api不适用于客户
我使用firefox的rest客户端插件将以下标题信息传递到url localhost/magento/api/rest/customers 我通过以下标题信息:magento api不适用于客户,magento,content-management-system,Magento,Content Management System,我使用firefox的rest客户端插件将以下标题信息传递到url localhost/magento/api/rest/customers 我通过以下标题信息: Consumer key :olnnqgwm7gm75rtbft8w1wac4kp4vwig Consumer secret:u9v6bdlpuopdlryc6vx0yjnslkj4vllo Access token : null Access token secret : null 我会作出以下回应: <magento
Consumer key :olnnqgwm7gm75rtbft8w1wac4kp4vwig
Consumer secret:u9v6bdlpuopdlryc6vx0yjnslkj4vllo
Access token : null
Access token secret : null
我会作出以下回应:
<magento_api>
<messages>
<error>
<data_item>
<code>401</code>
<message>
oauth_problem=parameter_absent&oauth_parameters_absent=oauth_token
</message>
</data_item>
</error>
</messages>
</magento_api>
所以在这里我想得到访问令牌和访问令牌秘密如何得到它
Access token : null
Access token secret : null
这对于通过RESTAPI获取客户的详细信息是必需的。您必须按照定义配置身份验证过程,请通读本文,您将得到答案
获取未经授权的请求令牌
URI localhost/magento/oauth/initiate
方法:邮寄
返回:示例响应:oauth_令牌=4cqw0r7vo0s5goyyyqnjb72sqj3vxwr0h&oauth_令牌\u secret=rig3x3j5a9z5j6d4ubjwyf9f1l21itrr&oauth_回调\u确认=true
2.用户授权
Uri:localhost/magento/oauth/authorize
方法:获取
样本响应:/callback?oauth_令牌=tz2kmxyf3lagl3o95xnox9ia15k6mpt3&oauth_验证器=cbwwh03alr5huiz5c76wi4l21zf05eb0
注意:身份验证的第二步。没有此步骤中的用户授权,应用程序无法
获取访问令牌
3.获取访问令牌
Uri:localhost/magento/oauth/token
方法:邮寄
样本响应:oauth_令牌=0lnuajnuzeei2o8xcddii5us77xnb6v0&oauth_令牌=1c6d2hycnir5ygf39fycs6zhtaagx8pd
如果您完成以上所有步骤,您将获得访问令牌和密码,可用于获取客户响应
这对于通过RESTAPI获取客户的详细信息是必需的。您必须按照定义配置身份验证过程,请通读本文,您将得到答案
获取未经授权的请求令牌
URI localhost/magento/oauth/initiate
方法:邮寄
返回:示例响应:oauth_令牌=4cqw0r7vo0s5goyyyqnjb72sqj3vxwr0h&oauth_令牌\u secret=rig3x3j5a9z5j6d4ubjwyf9f1l21itrr&oauth_回调\u确认=true
2.用户授权
Uri:localhost/magento/oauth/authorize
方法:获取
样本响应:/callback?oauth_令牌=tz2kmxyf3lagl3o95xnox9ia15k6mpt3&oauth_验证器=cbwwh03alr5huiz5c76wi4l21zf05eb0
注意:身份验证的第二步。没有此步骤中的用户授权,应用程序无法
获取访问令牌
3.获取访问令牌
Uri:localhost/magento/oauth/token
方法:邮寄
样本响应:oauth_令牌=0lnuajnuzeei2o8xcddii5us77xnb6v0&oauth_令牌=1c6d2hycnir5ygf39fycs6zhtaagx8pd
如果您完成以上所有步骤,您将获得访问令牌和密码,可用于获取客户响应谢谢chanz现在我有了访问令牌,和保密,以便我可以访问localhost/magento/api/rest/products,但我无法访问localhost/magento/api/rest/customer如果您无法使用访问令牌通过rest api查看客户,我必须说您的完全身份验证未完成。有些事情出错了,我成功地完成了两个步骤。但在第三步中,我得到了oauth_problem=verifier_无效的响应。@Rathinam这个项目已经3年多了。现在,我什么都不记得了。很抱歉。谢谢chanz现在我有了access_令牌,并进行了保密,因此我可以访问localhost/magento/api/rest/products,但我无法访问localhost/magento/api/rest/Customer如果您无法使用访问令牌通过rest api查看客户,我必须说您的完全身份验证尚未完成。有些事情出错了,我成功地完成了两个步骤。但在第三步中,我得到了oauth_problem=verifier_无效的响应。@Rathinam这个项目已经3年多了。现在,我什么都不记得了。对不起。