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.

Having trouble with Invalid API Token

foxInDenfoxInDen Member
in Bugs & Feature Requests edited May 2013
Hi,
We are just getting started trying to call the API, so doing something basic like a post to action customer_get, but getting an xml response indicating an Invalid API Token. We are taking the token from the admin site advanced tab. Is there some additional treatment for the string we need to apply?

Our curl command looks like this, with the specific items omitted

curl -d "api_token=mykey&api_action=customer_get&customer_email=test@test.com" https://mystore.foxycart.com/api

Result is

<?xml version='1.0' encoding='UTF-8'?><foxydata><result>ERROR</result><messages><message>Invalid API Token</message></messages></foxydata>
Comments
  • We've just noticed that the key in the admin panel is changing on every refresh. Is it that the admin panel is just giving us a suggested default key, and we have to explicitly save it?
  • fc_adamfc_adam FoxyCart Team
    @foxInDen,

    You'll need to save your advanced settings to lock in an API key. I'm pretty sure we have a ticket to address that issue - I'll ping that to give it some extra weight.
  • Yea, figured that when it was changing upon refresh that we'd have to save it to lock in. All is well, thanks!
Sign In or Register to comment.