function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rodolfo NoviskiRodolfo Noviski 

System.CalloutException: Exceeded max size limit of 3000000 Response Google API

Hello,

I'm doing an integration with Google Drive, but when trying to read a spreadsheet is returning me the error message:

System.CalloutException: Exceeded max size limit of 3000000

Does anyone have any idea or has been there?
Can help me, please?

Thank you
AshlekhAshlekh
Hi,

This error occur due the the size of your http calls out. If you are sending any file in body or prameters list whose size exceed to 3Mb(3000000). Then this problem occur.

Maximum size of callout request or response (HTTP request or Web services call)1 3 MB

Here is the link where you can find the limit of callout.
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm

You need to check the size of body before hitting the API.


IF it helps you than please mark it as a solution and ENJOY APEX
Avidev9Avidev9
As stated, there is a 3mb limit on callouts. But there is Salesforce feature called "Flexible Limits" in Pilot that you can try out by enabling the same in org. You can find more detail here https://developer.salesforce.com/releases/release/Winter14/FlexAPILimits
Rodolfo NoviskiRodolfo Noviski
Thanks for the answers, but I think that I could not express myself correctly, I will rephrase my question. I can get treatment if Response is larger than 3MB I split this file into a smaller size so you can work with it. Or even on a Request?

Thanks for everyone's help