kalkun-sms/Kalkun

jsonrpc parse error

john-arvid opened this issue · 7 comments

Tried to test with some api in kalkun.
After I have installed jsonrpc plugin I try to send this:

curl -H "Content-Type: application/json" -d '{"method":"sms.send_sms", "params":{"user":"kalkun,"pass":"kalkun","phoneNumber":"12345678","message":"Testi"}}' http://192.168.1.226/index.php/plugin/jsonrpc/send_sms

I have also tested with a restclient extension in my browser.

But I only get this back from the server:
{"version":"1.1","error":{"code":0,"name":"Parse error","message":"An error occurred on the server while parsing the JSON text comprising the procedure call."}}
(It is a code 200 from http)

Using the latest master release of kalkun.

Please test using devel branch and check this again.

Ok, it was not as straight forward to update so it could take some time.

Just changing branch and running "composer install" and removing "install" file should be enough.

The json that you are submitting is invalid.

{"method":"sms.send_sms", "params":{"user":"kalkun,"pass":"kalkun","phoneNumber":"12345678","message":"Testi"}}

image

Also I don't think this plugin has been updated though in quite some time. Have you tried the rest-api plugin ?

Thank you, it was only that typo. jsonrpc plugin works as expected.

I am using a pre built docker image with kalkun from the master branch. So I want to avoid updating for now. (Since I'm not that experienced yet and it was a bit more than the instructions you gave)
And since rest-api plugin doesn't work as expected I will try to use the jsonrpc for now.

Woah! Nice, can you share the docker image details? We would try to publish official images based on that!

Sure, not mine but I think it looks good. https://github.com/McBane87/docker-gammu-kalkun