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
Charles Li 9Charles Li 9 

How to use REST API - List Organization Limits.

Hi there,

I have a probolem about REST API - List Organization Limits. I used the command below and used my account login token.

curl https://ap2.salesforce.com/services/data/v37.0/limits/ -H "Authorization: Bearer hdjrnslalrjJHGNdkskjnUJ" (fake token in this line)

And I got: [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

I guess the Bearer token is not the user security token, it shold be some other token. Am I right? If I am right, please let me know how can I get that token. Thank you very much.
SandhyaSandhya (Salesforce Developers) 
Hi,

That is the security token, and you can get your security token from your profile on the top corner --- my settings -- Reset your security token. -- you will get a mail with the security token.

If you are working on workbench

Just use /services/data/v37.0/limits/ and You can get all limits.

See below screenshot.

User-added image

Hope this helps you!

If this helps you please mark it as solved.

Thanks and Regards
Sandhya