I currently host Acumatica on my computer. I was able to access the Acumatica website (localhost) via the browser. However, when I try to log in via Postman, I keep getting error code 400. What do I have to do so that I can log in via Postman? I am only doing this to test if the API works, which I want to include in my C# code.
Postman Body:
{
"name": "admin",
"password": "admin"
}
POST: http://127.0.0.1/SmartFix_T190/entity/auth/login
ERROR:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"".dtd">
<HTML>
<HEAD>
<TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii">
</HEAD>
<BODY>
<h2>Bad Request - Invalid Hostname</h2>
<hr>
<p>HTTP Error 400. The request hostname is invalid.</p>
</BODY>
</HTML>
I currently host Acumatica on my computer. I was able to access the Acumatica website (localhost) via the browser. However, when I try to log in via Postman, I keep getting error code 400. What do I have to do so that I can log in via Postman? I am only doing this to test if the API works, which I want to include in my C# code.
Postman Body:
{
"name": "admin",
"password": "admin"
}
POST: http://127.0.0.1/SmartFix_T190/entity/auth/login
ERROR:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3./TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii">
</HEAD>
<BODY>
<h2>Bad Request - Invalid Hostname</h2>
<hr>
<p>HTTP Error 400. The request hostname is invalid.</p>
</BODY>
</HTML>
Share
Improve this question
asked Mar 4 at 11:15
SiboSibo
1
2
- Could you add a screenshot about your postman request? – Zoltan Febert Commented Mar 4 at 14:09
- Replace the loopback IP 127.0.0.1 With the Name or IP of the machine. Is the machine a Virtual Machine? – jdweng Commented Mar 4 at 17:41
1 Answer
Reset to default 1I believe you might be querying the wrong IP address. Have you tried opening your instance using the same IP in your browser?
Please verify your IP address and replace it with 127.0.0.1. You can then make the API call from Postman to your Acumatica instance.
For example:
http://localhost/test/entity/auth/login
If you are using the same computer where the instance is hosted, you can simply use localhost instead of the IP address.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745047692a4608195.html
评论列表(0条)