jadolg/rocketchat_API

Cannot login with username and password due to AuthenticationException

athola opened this issue · 2 comments

Currently logging in with the following form:

rocket_chat = RocketChat('user', 'password', server_url='https://path.to.url')

and I get the following exception:

raise RocketAuthenticationException()

when doing a curl request, I can login doing the following:

curl -H 'Content-type:application/json' https://path.to/url/api/v1/login -d '{"user": "user1", "password": "password1"}'

but cannot login doing the following:

curl https://path.to/url/api/v1/login -d 'user=user1&password=password1'

is there a way to perform the first type of login? it seems like the request.post in the base.py login function is more similar to the second type of curl request.

PEBKAC, closing issue

In my case, disable 2FA solves the issues...