Login using API gets Session Expired

I tried to login using the API:

def login_get_key():
	url = "https://mydomain.id/api/method/login"
	params = {
		'usr': 'administrator',
		'pwd': 'admin',
	}
	r = requests.post(url, params=params)
	print(r.content)

There are 3 sites, only 1 site (in server A) returns the Logged In message.
The other 2 sites (in server B) return Session Expired message.

I did it with some different users.

Can anybody please tell me why?
Does it have anything to do with the servers?
Thank you.