适用于Android应用程序的Magento REST API [英] Magento REST API for Android Application

查看:72
本文介绍了适用于Android应用程序的Magento REST API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何访问magento REST API?我尝试了很多方法,但无法获得正确的解决方案.我可以通过www.magentohost.com/api/v2_soap/?wsdl访问SOAP API,响应为

How to access magento REST API? I tried lot of ways but I cannot get correct solution. I can access SOAP API via www.magentohost.com/api/v2_soap/?wsdl and the response is

<definitions xmlns:typens="urn:Magento"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
targetNamespace="urn:Magento">
<types>...</types>
<message name="endSession">...</message>
<message name="endSessionResponse">...</message>
<message name="login">...</message>
<message name="loginResponse">...</message>
<message name="resourcesRequest">...</message>
<message name="resourcesResponse">...</message>
<message name="globalFaults"> 
 etc..........

但是我无法通过www.magentohost.com/api/rest以及许多方式访问REST API.如何在magento中使用REST API?

but I cannot access REST API through www.magentohost.com/api/rest and also many ways. How to REST API in magento?

推荐答案

如果您需要从magento获取其余api,请先从Magento获取Oauth令牌.您可以获取此证书.在获得未经授权的请求令牌,用户授权之后,您最终可以获取Oauth令牌.

If you need to get the rest api from magento first get the Oauth Tokens from the Magento. You can get this After get the Unauthorized Request Token,User Authorization finally you can get the Oauth Tokens.

编辑magento中的php/api.php文件以链接产品和客户详细信息,然后只有您从Magento获得REST API

Edit the php/api.php file inside the magento to link the products and customer details then only you get the REST API from Magento

这篇关于适用于Android应用程序的Magento REST API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆