FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
803 views 1 comments
by anonymous

Hi everybody,

I read on a post that is possible to use Curl to automatize SMS, but each time I try to use it I have the same answer :

curl -X POST http://192.168.1.1/cgi-bin/sms_send?username=user&password=pass&number=003XXXXXXXXXX&text=testmessage

Bad username or password

I checked credentials with htpp methop all is fine, can anyone help me and provide me correct syntax to send a sms with curl ?

Thanks a lot

1 Answer

0 votes
by anonymous

Hi, what you're trying to curl should be in between the commas.

So your command should look like this:

curl -X POST "http://192.168.1.1/cgi-bin/sms_send?username=user&password=pass&number=003XXXXXXXXXX&text=testmessage"

Error output you were getting was because of the & symbol, which confused the CURL, so everything should be in commas in order to work right.

I hope this helps.

EB.

by
Hi,

Thanks for your answer, I found solution, it's my own fault.

I try to send a POST instead a GET, that don't explain why I receive a "bad username or password" message, but it's work now :)

You can close.