Page 1 of 1

api login issue

Posted: Mon Jun 15, 2020 6:59 am
by vizilipu
I am trying to login using the API but I keep getting this error message

{"code":400,"status":"fail","message":"Username not set (90011)."}


The command I am using:

curl -c cookie -b cookie -X POST -H "Content-type: application/json" -d '{"username":"admin","password":"unl"}'v

share my favorite adult xxx sites
https://freeporn.ooo
https://camjke.com
https://pornsites.pro

Re: api login issue

Posted: Mon Jun 15, 2020 7:23 am
by guillaume.vilar
Hi,

I tested your command and it works on my eve-ng node so I guess it is not a syntax error.

--> Are you able to login to the web interface using that username/password?
If not, you need to create that credentials, or change the default password for the 'admin' username, which is 'eve'.

--> What is the path you are using?
In my case I was using the following path (/api/auth/login). This is the full command I was using:

Code: Select all

curl -c cookie -b cookie -X POST -H "Content-type: application/json" -d '{"username":"admin","password":"unl"}' http://1.1.1.1/api/auth/login 
You need to replace 1.1.1.1 by the IP address of your server.

Cheers,

Guillaume

Re: api login issue

Posted: Sat Jul 18, 2020 9:21 am
by fomka31ru
someone wrote here that its work only for linux or wsl but not for windows

Re: api login issue

Posted: Wed Feb 03, 2021 5:58 pm
by cbarbudo
I tried to test API using Postman in Windows trying to POST same data, but no results. Did somebody tested with Postman?

{
"code": 400,
"status": "fail",
"message": "Username not set (90011)."
}