I was asking How should one fetch Application Permissions via API?, but apparently it wasn't so clear, so I'll try to rephrase it. What I am trying to do, is to fetch thru API the scopes of all of the connected apps that are not part of my organization.
For example, I installed Slack, and when navigating to its connected app page, I see the following:
Therefore I know the application has scopes, yet I can't figure out how to fetch those neither thru the SOAP API nor thru the metadat API.
Any help will be appreciated.