Page 1 of 1

API call works from TEST but not when calling from Web Page

Posted: Tue Dec 23, 2014 11:21 pm
by nate7260789

I have an API that works fine when testing but when calling the code from the web page, it fails although I have a good access token. The test uses the exact same access token for testing and yet it still fails. What could be wrong?

{"meta":{"code":400,"message":"Bad Request","error":"Missing access token. See http:\/\/[url=http://www.mytouchtunes.com\/docs\/authentication","error_code":400,"error_params":[{"param_name":0,"param_message":"invalid_request"}]},"response]www.mytouchtunes.com\/docs\/authentic...[/url]":{}}

API used
https://api.mytouchtunes.com/v2/locat...


API call works from TEST but not when calling from Web Page

Posted: Wed Dec 24, 2014 3:12 am
by Yurii Orishchuk

Hi Nate,

At first, you should use Appery.io proxy if you test it from Web page.

http://devcenter.appery.io/documentat...

Please open browser debugger on network tab end run your service. You will see request in debugger. Learn request parameters and headers then compare it with specified in API document.

Regards.


API call works from TEST but not when calling from Web Page

Posted: Wed Dec 24, 2014 2:56 pm
by nate7260789

Thanks but I did all of that. The parameters, headers are the same.I also have proxy set


API call works from TEST but not when calling from Web Page

Posted: Thu Dec 25, 2014 12:04 am
by Yurii Orishchuk

Hi Nate,

Please give us your app public link and describe steps to reproduce this problem.

Regard.