Rest API connection problems - can anyone help?

Hi All,

I’m having a problem connecting to my cloud data via the API Rest method. I can connect from my home computer without issue but from work I get a 500 Internal Server error. I don’t know where to start with troubleshooting this so if someone knows of an application or tool which might help please advise. I’ve tried both Google Chrome’s Advanced Rest API app plus now Postman and the same result.

I thought of Windows firewall but if that was the case I wouldn’t be able to connect at all. If it helps here is a screenshot of the result from my work machine.

I know the URL and credentials are correct as they work from my home computer.

Thanks.

Can you share your request url , request type and input data?

Well not without compromising my data security by exposing a “live” login to my system. How or why would the same client get different results just because of connecting from a different location?

If that helps…

set url as, https://mcleanimages.frappecloud.com/api/method/login
and instead of GET, use as POST.
keep params section as it is.

What sort of authentication do I use as Basic results in the same error

Try by setting,
Authorization tab value to No Auth,
Method = POST
URL, https://mcleanimages.frappecloud.com/api/method/login
param,
usr username
pwd password

also check for user credentials, if those were wrong, then also it throws 500 ie. internal server error

I can’t set No Auth and set a usr/pass for params as No Auth removes the params boxes…

I tried with another account and still same error.

@monojoker /api/method/login is a POST request, it does not use HTTP AUTH

OK @rmehta but not sure how that helps me. Interestingly if I try from the REST client on my ipad at home I get Internal Server error and if I try from another PC here same deal. Even if I just put the URL into a “normal” browser address bar I get an Internal Server Error. This is really annoying as it appears REST API would be a great way for me to extract data for other applications…

@monojoker can you post your exact URL string at support@erpnext.com ?

Sure can, sent you the two I’m trying. If I put the entire URL with usr & pwd in my browser and press return it strips it back to

https://mcleanimages.erpnext.com/api/method/login

And returns Internal Server Error

Like it’s not even trying to send/parse the credentials…

Please close, I was using the wrong url string… needs to be:

https://mcleanimages.erpnext.com/

rather than:

https://mcleanimages.frappecloud.com/

Thanks @rmehta for your help.

1 Like