How to call an azure web app externally?

2020-06-16T19:44:03.757+00:00

Hi,
I have made an azure web app which sends email to outlook.
So, In the email html body there will be one hyperlink which will call another azure web app.
How to configure that in the hyperlink and call another azure web app ?
FYI, The azure web app is written in python flask.

Any suggestion will help.

Thanks in advance.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,941 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,362 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 27,026 Reputation points Microsoft Employee
    2020-06-18T00:08:35.6+00:00

    Hi @MITRADebarthaGECoreTechCyber-2843,

    There's nothing to it my friend. I'm not sure if you flask app is the email app itself or if it's sending the request, but it really doesn't matter. What you would do though is create an endpoint on your email generator app that will respond to HTTP request, a post. Something like

     @app.route('/send',methods = ['POST'])
     def login():
        mailbody = request.form['body']
        // send email 
        return 200
    

    and from your other app, you would simple send an HTTP POST request to https://youemailapp.azurewebsites.net/send.

    Let me know if that helps or if you have any blockers.