Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

Is API limits salesforce on outbound or inbound?

Asked by Aashish Chaursiya Jun 6, 2023 2.0K views 1 answer
Share

About this question

Does the Salesforce API limit apply on outbound API requests or only on the inbound API requests?

From this Knowledge article:

  1. What counts towards my API limit?

SOAP (https://www.salesforce.com/developer/docs/api/Content/sforce_api_calls_list.htm) and REST API calls (which include Bulk API calls) are counted against an organisation API call limit.

This appears to be an inbound call that will be counted against the API. But it's quite strange when I tried it out in my developer org:

  1. I got a new developer edition.

  2. Logged in and navigated to Company Information and the API calls are at 0, as I would expect

  3. I went to the developer console, and executed the following script that makes an API callout to GitHub API. It'd fail as it wouldn't have authentication, but it'd make the API callout alright. (I've also added it in remote site settings)


Http h = new Http(); HttpRequest req = new HttpRequest(); req.setMethod('GET'); req.setEndpoint('https://api.github.com/users/mralexgray/repos'); HttpResponse response = h.send(req); System.debug(LoggingLevel.INFO, 'response :' + response);

When I executed this script once and checked the API calls, I expected it to remain at 0. But for some reason, it's 31 calls! Which is a weird number. I've executed that in a for-loop for 10 times and the API calls grew to 60 and I now have no idea if my external callouts are being included in the API limits.

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.