06-02-2019 07:28 PM
Hello All,
I am trying to send a json document as input in the body of a REST POST call. The configuration of the REST Snap is in the image attached below. I am getting a 401 error, “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”
I ran the same call in Postman and it worked just fine. It would be really great if someone could help me configure the Snap right to make it work. Thanks!
06-03-2019 07:58 AM
I think most apis have no way of passing/remembering the authorization, and postman gets away with this by having an option to set the headers:
On MY example here, I would have to call the API with the logon sequence, parse the access token out, and replace {{accessToken}} with that value. You can test all that with a copy of the reference in postman. Also, check the headers, and make sure you are passing all of the needed ones, and no improper ones.
On your example, you would have to add the header as an “HTTP header” on the REST call. I believe that is the way many work. SOME work by typing the ip to the login, but even then you have to login, in some way.
06-03-2019 08:21 AM
Another way of authenticating and authorizing an HTTP requests is through an account. The REST Post snap can use these accounts:
Otherwise, you’ll probably need to configure the snap with the correct method of auth for that end point.
06-04-2019 08:01 AM
Thanks for the help! I played around with the configuration as per the documentation and the REST POST worked. The Oracle environment we were trying to push the data to was being refreshed which was partially the reason for the errors.
06-08-2023 07:04 PM
When configuring a REST Post of the mailjet API, it indicates the following message.
Error:
Reason: REST API service endpoint returned error result: status code = 403, reason phrase = Forbidden, refer
to the error_entity field in the error view document for more details
Resolution: Please check the values of Snap properties.
Error Fingerprint[0] = efp:com.snaplogic.snap.api.rest.89xhsFt7
When performing the test in Postman, the execution is correct