Home > OS >  Publicly Exposing an API Endpoint
Publicly Exposing an API Endpoint

Time:12-31

Edit: this is a conceptual question. I can produce a minimal reproducible example upon request if necessary.

I have created a flask RESTful API and it is deployed to my loopack address. I understand that this is an address accessible only to my machine. I have very little understanding of computer networks, and am trying to understand how I could expose this API endpoint.

Running on http://127.0.0.1:5000/ (Press CTRL C to quit)

I am trying to configure a callback URL for a script that makes API calls utilizing an OAUTH2 callback. I want them to send my oauth tokens back to this API endpoint, but dont understand how to expose the endpoint publicly.

I initially thought I could just put my public IP and port 5000, but that does not work. If anyone could point me to how to expose this publicly I would really appreciate it.

Thank you.

CodePudding user response:

You need to configure your router to receive a packet come from internet and foward it to your computer located at your internal network.

Follow this or a similar tutorial to do that

  • Related