I'm trying to renew my expired auth_token using the refresh token.
My API and OAuth was working fine 40min ago, and I'm now getting "The grant type was not specified in the request" even though the grant_type is set to "refresh_token" as per the documentation.
** got it working, thanks
This one took me forever to figure out, and should be documented in the official API docs since they suggest to use cURL.
[ and ] are invalid characters in a URL. The cURL wrapper that languages like PHP use automatically and silently get rid of them. So when Lightspeed asks you to create a request like:
This request is going to fail. Lightspeed will respond with 400 Bad Request "load_relations must be passed as a JSON encoded array."
The solution? Encode JUST the [ ] characters and remove the escape backslashes:
This will fix the issue.
For some reason, this isn't documented anywhere. Lightspeed, please add this to your documentation. It would have saved me so much time today. (I finally found the solution here: https://groups.google.com/forum/#!topic/merchantos-api-developers/9CDhGkSSp7U -- in an obscure old mailing list post.)