Home > Forum > Actions > Call external REST API behind corporate proxy

Call external REST API behind corporate proxy
0

MVP

Hello! Is there anyone who could help me figure out how to call an external REST API from behind a corporate proxy? I manage to successfully call it using Postman application installed on the server where Webcon is installed. However, when the same call is made from Webcon, it doesn't work. I'm using the POST method of the "Invoke REST Web service" action on a menu button.

If I enable "Use proxy" in System settings I get the following error:
Request Url: https://test.findynamic.com/iris/credit-card/api/buyers Response Code: MethodNotAllowed (405) Exceptions: Rest service call failed. Http code MethodNotAllowed (405). Inspect log to get more information.

If I disable this setting, I get this:
Request Url: https://test.findynamic.com/iris/credit-card/api/buyers Response Code: Exceptions: Error occurred : The remote server returned an error: (407) Proxy Authentication Required.

Any ideas?

MVP

Hi Martin,

I was fortunate and had to deal with proxies only once. :)
Maybe some of these ideas may help you:
1. Verify that the Workflow Service User and Application Pool user running the Portal can access the internet or if the proxy server requires some kind of authentication. You could also execute Postman using und these accounts to verify that it works.
2. Ask the it for an exception so that requests executed by these users are bypassed.
3. If 2 is not an option maybe they can add an exception that traffic from all BPS Servers to the target URLs are ignored.


Best regards,
Daniel

MVP
In reply to: Daniel Krüger (Cosmo Consult)

Hi Martin,

I was fortunate and had to deal with proxies only once. :)
Maybe some of these ideas may help you:
1. Verify that the Workflow Service User and Application Pool user running the Portal can access the internet or if the proxy server requires some kind of authentication. You could also execute Postman using und these accounts to verify that it works.
2. Ask the it for an exception so that requests executed by these users are bypassed.
3. If 2 is not an option maybe they can add an exception that traffic from all BPS Servers to the target URLs are ignored.


Best regards,
Daniel

Hi Daniel and thank you for taking the time to write a few lines. It's much appreciated. However, it doesn't help me as I already did what you proposed at point 1. In fact, as I wrote above, in Postman I can successfully call the API. Point 2. is not an option. I don't understand your 3rd point. Anyhow, I just need to replicate the Postman configuration in Webcon and I'm hoping someone here had experience with it.

MVP
In reply to: Martin Meze (Freelancer)

Hi Daniel and thank you for taking the time to write a few lines. It's much appreciated. However, it doesn't help me as I already did what you proposed at point 1. In fact, as I wrote above, in Postman I can successfully call the API. Point 2. is not an option. I don't understand your 3rd point. Anyhow, I just need to replicate the Postman configuration in Webcon and I'm hoping someone here had experience with it.

Hi Martin,

don't get me wrong I just want to make sure that I've explained myself.
1. You are probably using a account for the RDP connection like BPS_Admin. So you would need to choose the "run as" option to execute Postman as BPS_Service or BPS_AppPool. If you did I have no further idea.

2/3. In some proxy servers exceptions can be defined so that not all traffic must be processed by the proxy server. Most of the time they are used to add some security layer for normal users. This is not necessary if services are communicating. Therefore exceptions can be set up by the admins. I known that these exceptions can be defined on user level or server/ip address. But this is only something the IT department can tell you and it seems that adding such an exception is not an option.

I don't remember an option to set up proxy credentials in the designer, but than again I didn't need one. What kind of credentials do you need to use for the target REST Api. Is this secured by windows credentials or has it an own authentication mechanism? If it's secured with windows credentials these credentials will probably be used for authenticating against the proxy, too. I don't know the internal workings of Postmam, but if the later is the case I would execute Postman under this user.

Sorry for these generic questions.More specific could only be provided by the IT department checking the log while you are executing the REST calls.

Best regards,
Daniel