0

I want to get the list "Connected Apps OAuth Usage", which REST API can be usefull to it?

0

A cursory search tells me that the object you're looking for is the OauthToken object.

To my surprise, it can be queried via SOQL, and thus we should be able to obtain information using the standard REST API resources (i.e. /services/data/vXX.X/sobjects/OauthToken/<record id>/ and /services/data/vXX.X/query/?q=<your+query+here>)

The OauthToken object does contain extremely sensitive data though, so I cannot recommend grabbing the information from the REST API. The SFDC Web UI has controls in place to help limit what data can be seen, and who can see it. If you don't have similar controls in place (and if you have to ask if you do have appropriate controls in place, you do not have appropriate controls in place) then doing this is just begging for someone to gain high-level, unauthorized access to your Salesforce orgs.

1
  • There's no /<record id> (and the docs don't mention it). The API call only returns the delete token to revoke access, the other token values are set to a literal value of (hidden). – identigral Apr 8 at 18:11

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.