Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send requests from HTTPS webapp #4

Open
saikarthikp9 opened this issue Dec 9, 2020 · 5 comments
Open

How to send requests from HTTPS webapp #4

saikarthikp9 opened this issue Dec 9, 2020 · 5 comments

Comments

@saikarthikp9
Copy link

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.

@davilatk
Copy link

davilatk commented Jun 3, 2021

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

@tensor5g
Copy link

tensor5g commented Sep 10, 2022

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.

@mtuchi
Copy link

mtuchi commented Jul 7, 2023

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.

Insightful answer, i am curios on how to setup the site to site VPN so that i will be able to make request from any web-app, I have tried using openvpn.com to setup the site to site connection but i don't know what i am doing. Can you share some guideline on how to setup site to site vpn connection using openvpn cloud

@tensor5g
Copy link

tensor5g commented Jul 9, 2023

I've never used openvpn cloud so I'm not sure for that specifically. But your webapp would need to be running on a full vm instance so that you could install openvpn on the underlying OS. If you're using some sort of stripped down cloud service for web hosting, probably not an option. Cloudflare tunnels might be an option. That would open the sms service up to the internet using a connector, but it would be secured behind cloudflare and token authentication. I haven't done this myself either, but this should help: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps

@mtuchi
Copy link

mtuchi commented Jul 10, 2023

Thanks @tensor5g let me give it a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants