Issue
Trying to connect to the REST API using POST /api/session to authorize.
Getting error:
{"errors":{"username":"value must be a non-blank string."}}
Steps to Reproduce
- Run jar file
- Sign into Metabase
- Open Python
- Execute the following:
url = "https://localhost:3000/api/session"
payload= {}
headers= {
'username': '_email@email.com_',
'password': '_password_'
}
response = requests.request("POST", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
I Have Also Tried
- Used Postman to send the call. Same error
- Switching Headers and Payload in Python request. Results in
SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')])
- Used curl to send the call (
curl -X POST -d "Content-Type: application/json" -H '{"username": "email@email.com", "password": "password"}' http://localhost:3000/api/session
) . Same error - Switched -d and -H in curl:
curl -X POST -H "Content-Type: application/json" -d '{"username": "email@email.com", "password": "password"}' http://localhost:3000/api/session
. Same error - Removed Content-Type header:
curl -X POST -d '{"username": "email@email.com", "password": "password"}' http://localhost:3000/api/session
. Same error.
Metabase Version
- Metabase 0.35.3
- Using jar file