我已经在我的magento管理员上注册了我的应用程序。
已经得到了消费者密钥和消费者机密。
但是我没有机会得到访问令牌和访问令牌密钥。
上面写着
oauth_problem=parameter_absent&oauth_parameters_absent=oauth_consumer_key
我正在基于这个链接进行测试
http://www.magentocommerce.com/api/rest/testing_rest_resources.html
我需要知道的答案是
发布于 2012-12-20 12:03:44
0)将 安装到您的chrome
1)使用以下命令获取oAuth客户端工具:
sudo gem install oauth
2)设置Magento服务器
3)获取oAuth令牌
oauth \
--verbose \
--query-string \
--consumer-key v484mnii2jyswedm6uo2cfcjay7uy49snws \
--consumer-secret koay6845che7giy5lr17gnrhckkbhf8h5 \
--access-token-url http://www.yourstore.com/magento/oauth/token \
--authorize-url http://www.yourstore.com/magento/oauth/authorize \
--request-token-url http://www.yourstore.com/magento/oauth/initiate \
authorize
回应:
Server appears to support OAuth 1.0a; enabling support.
Please visit this url to authorize:
http://www.yourstore.com/magento/oauth/authorize?oauth_token=ey6fokp0pbzwr1016eb528y5xw1ak5ji
Please enter the verification code provided by the SP (oauth_verifier):
YOUR_CODE_HERE
Response:
oauth_token_secret: g9kyz8c7zv868d58eav1muih3gxvq763
oauth_token: aqvlfv9tuexn0mqiydgkaff4ixxg8743c
接口4)调用接口
oauth \
--consumer-key v484mnii2jyswedm6uo2cfcjay7uy49snws \
--consumer-secret koay6845che7giy5lr17gnrhckkbhf8h5 \
--token aqvlfv9tuexn0mqiydgkaff4ixxg8743c \
--secret g9kyz8c7zv868d58eav1muih3gxvq763 \
--uri http://www.yourstore.com/magento/api/rest/products \
debug
试试http://www.yourstore.com/magento/api/rest/products
找到了解决方案
http://www.aschroder.com/2012/04/introduction-to-the-magento-rest-apis-with-oauth-in-version-1-7/
对于php
https://stackoverflow.com/questions/13263343
复制相似问题