2

I'm running Magento CE 1.8.1 and trying to access my Magento site over the API using the URL http://www.mysite.com/index.php/api/v2_soap?wsdl=1, but I'm getting redirected to https://www.mysite.com/index.php/api/v2_soap?wsdl=1. The site recently went live, and the API worked fine. The development site was not running over https, and was not getting redirected.

Any thoughts on how to avoid the URL getting redirected to https?

Thanks!

1

Since your web/secure/base_url on your dev server was set to

www.mysite.com/

Then your api url and other secure url would be www.mysite.com/ but now that your live site is https then you will get redirected.

Also since your api calls contain your api usename and password you should update your url to https. You may also want to considering using self-signed ssl certificates for you dev environment.

  • Not a good idea to pass API credentials in the clear as HTTP does, you're just asking for a packet sniff and a hack... So it's highly appropriate as pointed out to have the Magento API only available on HTTPS when secure base URL has been supplied. – Fiasco Labs Aug 25 '14 at 23:42
1

You need to uncomment a line in the .htaccess file

############################################
## uncomment next line to enable light API calls processing

    RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]
0

api should works with both http and https. There are some htacces redirection available ,which prevent the redirection.Contact with hosting provide and i facing same problem in my one project.Hosting provider have solved this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.