| Muhammad Hassan

A custom connector is a wrapper around an API that allows Logic Apps, Power Automate, or Power Apps to communicate with that API. During the development stage of an API (which is to be consumed by a custom connector) we are not able to connect because locally hosted APIs are inaccessible by a connector(Cloud). In this article we will be learning how to access locally hosted APIs from cloud.

We will be using ngrok here which provides a globally accessible host url to your local host. For this head over to your browser and enter the following url: https://ngrok.com/download

How to use Locally hosted Api’s in Custom Connectors

Download the zip file and double click on the executable file after extracting it. This will open a command line interface.

Now go to make.powerapps.com and sign in. Then expand the ->Data option, click on ->custom connector and click on ->Create from blank.

How to use Locally hosted Api’s in Custom Connectors

Now go to the ngrok CLI and Enter the following command: ngrok http https://localhost:44344 -host-header="localhost:44344" and hit Enter. This will provide you http and https urls to access your local host. We will be using https here but http can also be used. Now my local host https://localhost:44344 can be accessed by https://3a42-202-47-44-135.ngrok.io

Note: Enter your local host URLs above.

How to use Locally hosted Api’s in Custom Connectors

Then go to powerapps and Enter the details including the new ngrok url like below.

How to use Locally hosted Api’s in Custom Connectors

Now go to security and provide the security to access your API. I am not using any security for my API.

How to use Locally hosted Api’s in Custom Connectors

In the Definition’s tab add an action and provide the relevant details then click on import from sample to set the request sample.

How to use Locally hosted Api’s in Custom Connectors

After that click on default response and enter the json response from your API.

How to use Locally hosted Api’s in Custom Connectors

Then hit save or update and test your custom connector.

How to use Locally hosted Api’s in Custom Connectors

Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.



About The Blog

Stay updated with what is happening in the Microsoft Business Applications world and initiatives Imperium is taking to ease digital transformation for customers.


More About Us

We provide guidance and strategic oversight to C-Suite and IT Directors for on-going implementations. Feel free to give us a call.

1 331 250 27 17
Send A Message

Ready to Start?

Get a personalized consultation for your project.

Book a Meeting