cancel
Showing results for 
Search instead for 
Did you mean: 

rest api - fail to get oauth_token

SOLVED

rest api - fail to get oauth_token

hi

i'm trying to use the rest api by following http://www.i2factory.com/integration/enable-Magento-api-rest . but instead of getting the oauth_token i'm redirect to magento frontend default page .

i also tried http://devdocs.magento.com/guides/m1x/api/rest/testing_rest_resources.html

but i get soap-env xml as returned with "Invalid XML"  .. any idea ? 

 

my env : magento 1.9.3.2 & php 5.6.25 & apache 2.4.23

 

return xml

<SOAP-ENV:Envelope xmlnsSmiley FrustratedOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>Sender</faultcode>
<faultstring>Invalid XML</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

 

after digging a little bit it seem like the problem is the Qouth_callback parameter . in the above examples , it should be letf empty or point to magento himself .in my case it's http://localhost/magento . should i set any script / page .. something for it ? .

The default magento page is load as a result of redirect when using localhost , but when using 127.0.0.1 i get

oauth_problem=parameter_absent&oauth_parameters_absent=oauth_callback

 what should be the callback address and what should it contain ? 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: rest api - fail to get oauth_token -solved

seem like i had two problems

1. php_oauth.dll fail to load in my php setting

2. some DNS problem using localhost . i change it to 127.0.0.1 

 

using the php script from "http://devdocs.magento.com/guides/m1x/api/rest/authentication/oauth_authentication.html " it works . 

 

 

View solution in original post

1 REPLY 1

Re: rest api - fail to get oauth_token -solved

seem like i had two problems

1. php_oauth.dll fail to load in my php setting

2. some DNS problem using localhost . i change it to 127.0.0.1 

 

using the php script from "http://devdocs.magento.com/guides/m1x/api/rest/authentication/oauth_authentication.html " it works .