Bearer Token Authorization issue with RESTFul API from Ensemble REST Operation EnsLib.REST.Operation
Hi dev community,
I am currently working on a project to send documents to a RESTful based API that supports bearer
When we try to fire a JSON request from our EnsLib.Rest.Operation towards the 3rd party API with a
valid Token we keep receiving Authorization Error codes HTTP 401 back.
If we use the same request and same Token from a test utility such as Postman the request is
successful and we are able to move past the authorization stage.
We are inputting the Token in the header of the HTTP request as specified by the 3rd party API
specification. We therefore are using the following code from the operation side, being tHttpRequest a %Net.HttpRequest object:
set tSC = tHttpRequest.SetHeader("Authorization","Bearer "_$ZSTRIP(pRequest.Token,"<>W"))
We can see below the token in the HTTP header that is being fired towards the API:
User-Agent: Mozilla/4.0 (compatible; Cache;)
The question is if we might be missing something in order to set up the EnsLib.Rest.Operation to use Bearer token
Authorization and whether there is any workaround.