I am trying to consume sales force rest api service in my application.At that time,i am getting this exception

[{"message":"limits resource is not enabled","errorCode":"API_DISABLED_FOR_ORG"}]; HTTP Status: 403.

Please observe my source code

            JSONObject orgLimitJo       = new JSONObject()
    String orgLimitUrl          = "/services/data/v29.0/limits/"

    JSONObject accessTokenObj   = getAccessToken()
    String accessToken          = accessTokenObj.access_token
    String instanceUrl          = accessTokenObj.instance_url
    print accessTokenObj.access_token
    StringBuffer orgLimisList   = new StringBuffer()
    String orgLimitLine

    try {

        DefaultHttpClient httpClient = new DefaultHttpClient()
        HttpGet getRequest           = new HttpGet(instanceUrl+orgLimitUrl)

        getRequest.addHeader("Authorization", "Bearer " + accessToken)
        getRequest.addHeader("X-PrettyPrint", "1" )

        HttpResponse response = httpClient.execute(getRequest)      
        BufferedReader br = new BufferedReader(new InputStreamReader((response.getEntity().getContent())))

        while ((orgLimitLine = br.readLine()) != null) {


please help me. Thanks Anuradha

  • Did you ever find a solution for this? I'm getting the same response to my curl command. Both the profile and the user have API enabled. #!/bin/bash INSTANCE=./instance TOKEN=./token curl -v $args \ -H "Authorization: Bearer $TOKEN" \ "$INSTANCE/services/data/v29.0/limits/" [ { "errorCode": "API_DISABLED_FOR_ORG", "message": "limits resource is not enabled" } ]
    – tggagne
    Jul 8, 2014 at 15:30

2 Answers 2


You need to have both the API enabled and View Setup and Configuration system permissions enabled. When you miss the API enabled permission you get the error:

API is disabled for this User

When you miss the View Setup and Configuration permission you get the error:

limits resource is not enabled

(at least, that is what I observe when testing against a scratch org using sfdx force:limits:api:display)

  • 1
    Unfortunately the "View Setup and Configuration" system permission doesn't seem to be available under our "free limited access license" permission set on our PBO (which is our Dev Hub), so I'm struggling to enable access to this limits report for our developers.
    – Phil W
    Apr 17, 2020 at 8:21

Check that the profile of your user has API enabled checkbox marked true.This setting you will find in profiles.

  • Hi, I find "API Enabled" check box in the following path. setup--> Manage users --> Users --> select username -->Profile System Adminstrator -->click the System Adminstrator -->Administrative Permissions -->"API Enabled" check box already selected. Eventhough i am getting same error.
    – Anuradha
    Feb 17, 2014 at 7:20
  • @Anuradha Can you ask your admin which edition of salesforce there instance is ? Feb 17, 2014 at 7:52
  • Hi Mohith Kumar,i created account in "Free 30-day trial" edition.
    – Anuradha
    Feb 17, 2014 at 13:13
  • Hi which edition have you selected ?Use developer account from developer.force.com to avoid using any other org Feb 17, 2014 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.