POST Web API returning 401 with Postman (and with some apps)

Hi, we created a POST Web API that invokes a process model. Within Appian and using cURL, SoapUI, and Advanced REST Client (Chrome), we get a successful response (200 with expected response body). However, when we call it via Postman or via apps that we developed in Bluemix, it returns "HTTP Status 401 - This requires HTTP authentication". In the header, we include Authorization: Basic (base64 encoded username and password) for all our calls. Did anyone experience the same issue? Is there a solution/step that we may have missed in Appian? Thanks!

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi yes it's an expected behavior. When you create a Web-API (POST) and consume it from some different type of systems such as Java, .Net or any other, this require Cross Origin to be set.

    For this You can go to Admin Console >> Integration >> Embedded Interfaces >> Origins


    Using SoapUI and Chrome REST Client you have got the response, because they handle this configuration from their side.


    Hope this will help you
  • Thanks ! Does it mean that Postman doesn't have this configuration by default? If we are to set the Cross Origin, we need to enter the static public IP of our office? The thing is, we have added the Bluemix domain in the Admin Console already. The team invoking our Appian APIs are using Bluemix API Connect.
  • 0
    Certified Lead Developer
    in reply to Marc Angeles
    Yes, basically we need to set the public IP of the client PC inside Cross origin to avoid 401 issue while accessing the service
  • Okay, I agree with your suggestion regarding Origin. However, we did add it but didn't solve our issue.

    So we investigated further and we were able to catch the header thrown by Postman and it includes Origin: chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm. We think this is the problem because when we tried adding this to SoapUI and REST Client, we encountered the same 401 issue. So I asked our Bluemix guys to explicitly add the Origin: {Appian URL} and the app now works.
  • Hi Mark,

    I am facing the same issue. can you please tell me where did you add the Origin: {Appian URL} ?
    is it in postman's headers?
Reply Children