SmsGateway.me "message": "{message}" error

Hi Folks,

I have setup the SmsGateway.me to send SMS, but I am getting an error "data":{"exception":"Invalid input"} when I use "{message}" on the API code, if I write any text inside de qoutation marks it sends the message thru SMS.

<entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
<entry key='sms.http.url'>https://smsgateway.me/api/v4/message/send</entry>
<entry key='sms.http.authorization'>[MY TOKEN HERE]</entry>
<entry key='sms.http.template'>
    [{
        "phone_number": "{phone}",
        "message": "{message}",            __--->   "message": "ANY TEXT HERE WORKS",__
        "device_id": 1
    }]
</entry>

Has anyone a clue how to solve this?

Hello,

I re-type the "message": "{message}", line and it is working fine now, maybe a miss spelling???

Best regards.

Zuo Bruno6 years ago

Thanks for this share, Please let me know which file to edit when you want to activate SMS.
Thank you

cesaruben_ctes6 years ago

Hello on my server gives me this error:

com.cloudhopper.smpp.type.SmppChannelException: SMPP session is not connected - MessageException (SmppClient:254 < BaseProtocol:114 < CommandsManager:65 < ...)
Anton Tananaev6 years ago

Why have you enabled SMPP?

Hi everybody,

I believe that I have made de correct setup to use SmsGateway.me.
When I go to account and hit the test button, I received e-mail and sms notification, but when I setup to receive sms by events like, ignition on and off, it didn´t works.

Can anyone help me with that?

Hi, I see an issue here, when I choose Statistics. I notice that has two SMS Colum, one counts when I send a SMS Test event, in this case the SMS message goes thru, on the second Colum I see all SMS events that should go by SMS message, but it didn’t. Please take a look at the image below:

alt text

Can anyone tell me how to fix this, I think my problem occurs because that.

Best regards,
Alexandre.

Anton Tananaev6 years ago

It's just a label issue. One of those is email and one SMS.

Hi,

Again, when I test the SMS, it works fine but when I try to send custom commands it gives me e error message:

com.cloudhopper.smpp.type.SmppChannelException: SMPP session is not connected - MessageException (SmppClient:254 < BaseProtocol:114 < CommandsManager:65 < ...)

MY CODE

    <entry key='sms.enable'>true</entry>
    <entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
    <entry key='sms.http.url'>https://smsgateway.me/api/v4/message/send</entry>
    <entry key='sms.http.authorization'>********************************************************************************</entry>
    <entry key='sms.http.template'>
        [{
            "phone_number": "{phone}",
            "message": "{message}",
            "device_id": 188149
        }]
    </entry>

Any idea?

Anton Tananaev6 years ago

I don't think you can use it for commands. Only for notifications.

Buddhi6 years ago

@Alexandre Franklin I have same "data":{"exception":"Invalid input"} error can you please tell me how u overcome this \

rijotech6 years ago

The problem is related to this line "message": "{message}", and the way is process before or after is send.