0

I tried using that guide: https://powerautomate.microsoft.com/en-us/blog/on-premise-apis/

To work with my localhost running server with azure custom connector.

I've defined an API gateway and my local server is running but receiving:

    {
      "error": {
        "code": 500,
        "message": "No connection could be made because the target machine actively refused it 127.0.0.1:8000",
        "source": "unitedstates-002.azure-apim.net",
        "path": "forward-request",
        "policyId": "",
        "clientRequestId": "70655628-faaa-4725-8ea1-4b8a-e599385d"
      }
    }

When testing my connector.

My local server is at: http://127.0.0.1:8000

My gateway: enter image description here

My custom connector connection creation: enter image description here

My connector gateway settings: enter image description here

Note that:

This is power automate custom connector.

The Only diff is that I'm using the url from apiProperties.json file "x-ms-apimTemplateParameter.urlTemplate": "http://127.0.0.1:8000"

If I'm using localhost in the swagger host everything is fine.

David Meu
  • 1,527
  • 9
  • 14
  • Hello @David Meu, Could you please refer this https://powerusers.microsoft.com/t5/Building-Power-Apps/Can-t-connect-to-localhost-Visual-Studio-API-via-Custom/td-p/311577 . – AjayKumarGhose Jan 20 '22 at 08:20
  • I've followed it I have an api gateway online+I've configured what is needed in my CC but still. edited the post. – David Meu Jan 20 '22 at 08:26
  • BTW which IP should I use as the custom connector host? (In Logicapp custom connector I've Used localhost i.e 127.0.0.1:8000) Because in the guide I saw he is using his machine IP – David Meu Jan 20 '22 at 08:30
  • May i know if you are using your own IP address or not.! – AjayKumarGhose Jan 20 '22 at 08:39
  • I tried with my localhost,public,private ip's and port 8000. with all of those I've received errs. – David Meu Jan 20 '22 at 08:45
  • I see why it is not working! because I'm using the url from ```apiProperties.json``` urlTemplate seems it doesn't like it :| so I've created a connector only with the swagger and it is working. – David Meu Jan 20 '22 at 09:24
  • 1
    Let me check on my environment and get back to you..! – AjayKumarGhose Jan 20 '22 at 09:27
  • 1
    Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/241241/discussion-between-david-meu-and-ajaykumarghose-mt). – David Meu Jan 20 '22 at 09:54

0 Answers0