The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

API Bug on version 0.60 :/

swensorswensor Member
in Bugs & Feature Requests edited September 2013
Hello, I cannot connect to the API. My store version is 0.6.0, and my store subdomain is cgcw.foxycart.com. All I get when my update password script tries to connect is:

System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server.

I've tried updating my store's subdomain, etc. to no avail.

This used to work fantastically, and suddenly it does not. I can ping this subdomain, the checkout on this store's subdomain works just fine, SSO still works just fine, etc. I just can't use the API. Sorry if this is a duplicate issue, I couldn't find this in searches anywhere.

Here's a code snippet:

inputs.Add("api_token","xxxxxxxxxxx")
inputs.Add("api_action","customer_save")
inputs.Add("customer_email","xxxxxxxx")
Response.Write(PostTo("https://cgcw.foxycart.com/api",inputs))

Funny thing is, if I change this to a different subdomain, such as wellness-works.foxycart.com/api, it connects successfully but obviously complains about incorrect API key. So... I guess my store is in some limbo state where SSO, etc. work but my API doesn't.

Has anyone else had this issue? I need this resolved ASAP as it is broken on a live site and my client is pissed and threatening to leave my company. Cheers
Tagged:
Comments
  • fc_adamfc_adam FoxyCart Team
    @swensor,

    I just gave it a quick test to connect to your stores API using CURL and didn't have any issues connecting. So your store's API is indeed working.

    I'm not sure why your store would be erroring that it couldn't connect and another store is for you.
  • fc_adamfc_adam FoxyCart Team
    I just gave this another test using the default PHP included on our API page on the wiki and had no issues connecting.

    Is this an issue localised to you, or something that people on other connections are experiencing as well?
  • brettbrett FoxyCart Team
    @swensor, just a thought, but can you see what IP address your server is connecting to when it attempts that connection? It should be the same IP as example.foxycart.com and admin.foxycart.com. I'm wondering if perhaps the server's DNS isn't behaving as it should.
  • Brett, you nailed it. My server is returning 199.204.138.214 for cgcw.foxycart.com, whereas my mac brings it up as 199.79.51.69. Thanks for the tip! Let me see if I can identify what's up in my hosts file. Cheers
  • It was just a line in my hosts file, thanks for the tip! Not sure why it was hardcoded there in the first place, but that was the fix. Cheers everyone!
Sign In or Register to comment.