Skip to Main Content



For appeals, questions and feedback, please email

apex_web_service.make_rest_request to a REST service that returns a JWT response

InoLFeb 8 2024 — edited Feb 8 2024

I am using apex_web_service.make_rest_request (in APEX 23.2) to call a Cybersource REST API.

The API returns a JWT, not a JSON, body. For some reason apex_web_service.make_rest_request doesn't return the JWT. It doesn't return anything, but there is also no error.

It works in Postman (which is also trying to parse the response as JSON and returns a JSONError):

I'm quite sure the setup is correct. When I sent an invalid key on purpose to the API, I do get a JSON response:

{"response":{"rmsg":"Authentication Failed"}}

Can apex_web_service.make_rest_request handle JWT response?

It may be an unrecognized response header:

Content-Type: application/jwt;charset=UTF-8

I would expect an “as is” response from apex_web_service.make_rest_request, without any attempt to parse the response.

Post Details
Added on Feb 8 2024
1 comment