traccar-sms-gateway icon indicating copy to clipboard operation
traccar-sms-gateway copied to clipboard

How to send requests from HTTPS webapp

Open saikarthikp9 opened this issue 5 years ago • 5 comments

DESCRIPTION

What is the easiest way to send requests to this SMS gateway from a web app running on a cloud server? The webapp is on a different network from the SMS gateway.

saikarthikp9 avatar Dec 09 '20 06:12 saikarthikp9

Only remplace the content whit out [ ]

POST //[UR IP AND PORT]/ HTTP/1.1 Host: http AUTHORIZATION: [THE APP KEY] Content-Type: application/json Content-Length: 62

{ "to":"+5213333333333", "message":"Mensaje desde la API" }

image

davilatk avatar Jun 03 '21 17:06 davilatk

cURL example: curl -X POST "http://<ip>:8082" -d '{"to": "+<tel>", "message": "<message>"}' -H "Authorization: <api key>"

If they are on different networks, you should use a site to site VPN to bridge the networks. That's something you'll have to solve on the network side rather than on the app side.

tensor5g avatar Sep 10 '22 23:09 tensor5g