HTTP SMS API for SMSGLOBAL.com

Nabil2 years ago

Hello,
Please, how to configure HTTP SMS API from traccar config file for SMSGLOBAL.com ?

here is the url of smsglobal.com which works without any problème:

https://api.smsglobal.com/http-api.php?action=sendsms&user=fsdvmXXXX&password=vpSAXXXX&from=2126610xxxx&to=21266010xxxx&text=Hello

and here is the configuration I made:

<entry key = 'sms.enable'> true </entry>
<entry key = 'notificator.types'> web, mail, sms </entry>
<entry key = 'notificator.sms.manager.class'> org.traccar.sms.HttpSmsClient </entry>
<entry key = 'sms.http.url'> https://api.smsglobal.com/http-api.php?action=sendsms </entry>
<entry key = 'sms.http.user'> fsdxxxx </entry>
<entry key = 'sms.http.password'> vpSxxxx </entry>
<entry key = 'sms.http.template'> From = 21266010xxxx, To = {phone}, text = {message} </entry>

but it doesn't work !!

someone has a solution?

thanks for replay

Anton Tananaev2 years ago

Not sure how you expect it to work when your configuration doesn't match expected request that you provided.

Do they have proper API documentation? Do they support body parameters or just query string?

Nabil2 years ago

thanks anton for your answer
I think so
here is documentation : https://www.smsglobal.com/http-api/

Anton Tananaev2 years ago

In that case it will probably look something like this:

<entry key='notificator.types'>web,mail,sms</entry>
<entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
<entry key='sms.http.url'>https://api.smsglobal.com/http-api.php</entry>
<entry key='sms.http.template'>
    action=sendsms&user=fsdvmXXXX&password=vpSAXXXX&from=2126610xxxx&to={phone}&text={message}
</entry>
Alcaldejau8 months ago

I am having the same issue, since I dont' do much programming, my former server used to run using onliny one line https:

http://corporativo.allcancesms.com.br/app/modulo/api/index.php?action=sendsms&lgn=USER&pwd=PASS&msg=%MESSAGE%&numbers=%NUMBER%

Anton, would you please enlighten me on how to a set traccar up to run on the same premisses?

Anton Tananaev8 months ago

We only support data in the payload, not query parameters.