Forum Discussion

debra_paponette's avatar
debra_paponette
New Contributor
5 years ago

401 Error using Https in API REST GET call

In house API call that works well in all browsers and postman returns “REST API service endpoint returned error result: status code = 401, reason phrase = Unauthorized, refer to the error_entity field in the error view document for more details” when using the REST snap

The following was tried and the issue persist
-Create account from REST GET similar to what is used to access API from browser (NTLM)
-Trust all certificates settings checked on REST snap
-‘Keep-alive’ connection added to Header settings
-Cookie details added to Header settings

Does anyone have any suggestion to assist in getting this error fixed

33 Replies

  • See attached success from browser and postman as well as errror from snaplogic

    Note that all three instances uses windows AD to access the API and is the same user tested on all three. Both postman and browser is successful. Rest snap complains about it be unauthorised, which is not true

    • ptaylor's avatar
      ptaylor
      Employee

      Debra,

      For PostMan, you have Domain = GHL, but in the snap account, it’s ghl.int. Have you tried setting it to GHL there?

      • debra_paponette's avatar
        debra_paponette
        New Contributor

        Hi I tired ghl.int in the snap after the GHL wasnt working to see if. It made a difference. Same error using either GHL or ghl.int

  • Garrett's avatar
    Garrett
    New Contributor II

    I have tried tons of combinations of these and none of them worked. So sending a screen shot really is not very valuable.

    • tharunm's avatar
      tharunm
      New Contributor II

      Everyone,
      I hope this issue cleared by now, just posting this so that it helps someone when they check for solutions.
      I’ve run into a similar issue with a weather API. Two things to be modified here. I see that the query parameter values aren’t toggled, that’s the reason the REST GET isn’t fetching the data. and the service URL should be within quotes, e.g. “https://example.com/product?