'How to implement Kerio client API

I am trying implement Kerio webmail client API, at least get it working in Postman. This is my request:

{
"jsonrpc": "2.0",
"id": 1,
"method": "Session.login",
"params": {
    "userName": "[email protected]",
    "password": "myPassword",
    "application": {
        "name": "Petr Test",
        "vendor": "Petr",
        "version": "1.0"
    }
}

}

I have all the needed headers there

Accept: application/json-rpc Content-Type: application/json-rpc; charset=UTF-8 User-Agent: Kerio APIs Client Library for PHP/1.3 Host: mail.company.tld:443 Content-Length: 217 Connection: close

But keep getting some parse error in the response:

{
"jsonrpc": "2.0",
"id": null,
"error": {
    "code": -32602,
    "message": "Parse error.",
    "data": {
        "messageParameters": {
            "positionalParameters": [],
            "plurality": 1
        }
    }
}

}

Any ideas?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source