0

I want to handle the following exception in java code.

{"message":"limits resource is not enabled","errorCode":"API_DISABLED_FOR_ORG"}

I am getting the above exception when access limits api.

I tried 30days trial account. By that i could get the below exception. Even i am not able to hit any api.

{"message":"The REST API is not enabled for this Organization.","errorCode":"API_DISABLED_FOR_ORG"}

How can I restrict the access of limits api in salesforce dev account?

1 Answer 1

0

I don't believe you can actually get this error in Salesforce in the current version. It used to be a message you'd get when limits was a Pilot and you were not on the Pilot program.

Note: This feature is available through a pilot program in the Winter ’14 release. For information on enabling it for your organization, contact salesforce.com.

2
  • Thanks sfdcfox. But you say solution for not getting error. But we are not sure this feature is enabled by all users. If any one not enabled, the exception will occur. So i want to handle the exception. To handle , need to trigger exception automatically by enabling some option in sf dev account. I need to restrict limit option manually , exception will be triggered automatically.
    – Prabhu
    Commented Feb 17, 2018 at 9:49
  • @Prabhu As I said, you cannot generate the "limits resource is not enabled" error by any means I am aware of. It is enabled in all orgs, even in those that do not have the API (but, you'll get "API_DISABLED_FOR_ORG; The REST API is not enabled in for this organization" if you don't have API access). There's no reason to handle it any differently than you would any API_DISABLED_FOR_ORG error.
    – sfdcfox
    Commented Feb 17, 2018 at 13:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .