[#635] getUserToken issue

Migrated from Redmine #635 | Author: Y T
Status: Closed | Priority: High, I’m very impatient | Created: 2021-01-12


Hello,
INFO:jsonrpcclient.client.request:{“jsonrpc”: “2.0”, “method”: “getUserToken”, “params”: [“Galeeva”, “admin”, “XXX”], “id”: 1}
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): user-api.simplybook.me:443
DEBUG:urllib3.connectionpool:https://user-api.simplybook.me:443 “POST /login HTTP/1.1” 200 91

I’m receiving {“error”:{“code”:-32000,“message”:“Unexpected error”,“data”:null},“id”:“1”,“jsonrpc”:“2.0”}

Why ?

Y T wrote:

Hello,
INFO:jsonrpcclient.client.request:{“jsonrpc”: “2.0”, “method”: “getUserToken”, “params”: [“Galeeva”, “admin”, “XXX”], “id”: 1}
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): user-api.simplybook.me:443
DEBUG:urllib3.connectionpool:https://user-api.simplybook.me:443 “POST /login HTTP/1.1” 200 91

I’m receiving {“error”:{“code”:-32000,“message”:“Unexpected error”,“data”:null},“id”:“1”,“jsonrpc”:“2.0”}

Why ?

UPDATE: unbelievable!!! YOUR_COMPANY_LOGIN should be lower case, despite getToken works perfectly when 1st letter is capital. You should fix your API and at least return correct error code