SMS API using SMS.to

Anton Tananaev 4 years ago

It's a fixed prefix that you don't need to change.

Anton Tananaev 4 years ago

Curly Braces has to be removed of Phone , Message??

Why? That's placeholder for Traccar, not for you.

Aakansha 4 years ago

Im getting this error 401 Unauthorized ... in logs , even though I have input correct token

Aakansha 4 years ago
    <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.sms.to/sms/send</entry>
    <entry key='sms.http.authorization'>Bearer [API KEy]</entry>
    <entry key='sms.http.template'>
   {
        "sender_id": "[TRACCAR]",
        "to": "{91XXXXXXXXXX}",
        "message": "{HIIII}"
    }
    </entry>

API KEy was of 8 letters
I used these settings .....

Anton Tananaev 4 years ago

Hopefully you removed the square brackets around the API key.

Aakansha 4 years ago

yes I do remove Them

Aakansha 4 years ago
Anton Tananaev 4 years ago

Then you need to ask your SMS provider. They don't seem to accept your token.

Aakansha 4 years ago

I used Tracaar SMS Gateway APK

Anton Tananaev 4 years ago

Then your config is completely wrong.

Anton Tananaev 4 years ago

Why are you even asking on this forum thread then?

Aakansha 4 years ago

I thought this was for Traccar SMS Gateway!
Sorry!!
I'll ask on another discussion forum about traccar SMS gateway

Anton Tananaev 4 years ago

The topic clearly says it's about SMS.to service. It's in the title, in the description and even in the config you see that you're connecting to sms.to URL. Did you not even look once at what you're copying?

Aakansha 4 years ago

yeah I understood it was for the sms provider

<entry key='sms.http.url'>https://api.sms.to/sms/send</entry>

Now I had inputted this

<entry key='sms.http.url'>http://192.168.0.100:8082/</entry>

in place of the previous one.