How to use <%=access_token> in axios or increase $.request payload limit

Hi,

We are building an app which uses OAuth to authorize the user’s Salesforce account and the use case is to push ticket attachments to the Salesforce.

As the app uses OAuth, we can only use $.request method for all the communications between the app and Salesforce. (the <%=access_token> only works in $.request method, it won’t work any other request packages).

We used the $.request method to push attachments (base64 converted) to the Salesforce and it was failed because of the payload size limitation as $.request method supports only up to 120KB. (attachments below 120KB successfully pushed to Salesforce)

Also, here we cannot use any other request npm packages to achieve the use case. So is there any possibilities to increase the $.request payload limit or please let us know on how to use the <access_token> in axios or unirest.

Thanks,
Kannan

1 Like

Hi @kannansantharam,

As per your understanding and findings, larger attachments cannot be loaded via the Request API feature of the platform.
Since OAuth is used in your app, the access token cannot be accessed via any other HTTP client libraries.

We have the payload restriction for security concerns. Let me convert it as a feedback and pass on to the platform engineering team to find the resolution for your use-case.

Thank you for your detailed inputs.

1 Like