Question
Evonsys (PVT) LTD
Evonsys (PVT) LTD
LK
Evonsys (PVT) LTD
Posted: Mar 4, 2025
Last activity: Mar 24, 2025
Last activity: 24 Mar 2025 8:52 EDT
Solved
How to Send Binary File Data in Connector Request Body ?
Hi Team,
I have created a Connector rule in Pega, and I need to send a binary file as part of the request body. Additionally, I need to include the following headers in the request:
Authorization: Bearer <AccessToken>
Content-Type: application/octet-stream
I have also configured an Authentication Profile with OAuth 2.0 and Grant Type: Client Credentials to generate the access token.
My questions are:
- How can I properly pass the binary file content in the request body?
- In the Data Page, I have added other request data in the Request Data Transform. How can I ensure the binary file data is also included correctly?
- How can I confirm that the Authorization header is correctly passed when using the Authentication Profile?
Thank you,
Eranda.

Hi @MarijeSchillern, thank you for ansering my question, here is the one what found solution.
I have implemented the Base64 to binary conversion using the following approach:
byte[] bytes = Base64Util.decodeToByteArray(Base64BinaryContent); JavaObjectModeProperty.setValue(bytes)(JavaObjectModeProperty isClipboardProperty andBase64BinaryContent is string)This code converts Base64 format into binary and stores the value in the clipboard property.
Additionally, the authentication process will be handled within the Authentication Profile, including adding the Bearer
<token>. To ensure correct functionality:and this one is working properly.
Thank you,
Eranda.