Suggestion: SMS Gateway example request in website

GonzaloGM2 years ago

Hi, I just tried your SMS Gateway and works great, thanks for sharing and open sourcing it :) I had one minor suggestion and it was adding an example request with cURL or similar in the SMS Gateway page: https://www.traccar.org/http-sms-api/ mainly I was struggling a bit with the Authorization part, but after a couple tries I was able to get it working.

If you're interested, I could add it to a repo if there's one for the website. Maybe something like:

You can send an SMS by making a POST request to the URL that appears in the app, using a JSON payload. Here's an example with cURL:

curl --location --request POST 'http://192.168.18.43:8082' \
--header 'Authorization: 1d2d8d6b' \
--header 'Content-Type: application/json' \
--data-raw '
    {
        "to": "+5493513582275",
        "message": "SMS test"
    }
    '

Thanks a lot!

Best regards, Gonzalo

Anton Tananaev2 years ago

Thanks for sharing. I don't know if there's a good place to put it in the documentation, but at least we have it on the forum now.

GonzaloGM2 years ago

Sounds good, hope it's useful for someone else! :) Thanks again!

nzola78a year ago

Please can you send to me the php code like

$curl = curl_init();
curl_setopt_array($curl, array(
Alden Armenteros5 months ago

I have integrated SMS Gateway using my phone connected to WIFI, and I Setup the Authorization etc. to codeigniter php, problem is its only working if there's only 1 variable or static messages, and its its not if theres 2 or more variables in message payload. How to fix that?

Anton Tananaev5 months ago

We don't support group messages currently.