I read all the WSO2 IS documentation to understand how to login, register, and get user permissions through the Restful APIs. Finally, I did the login and registration, but I don't know how to get user permissions, and this is my point!
If you are building an oauth/oidc based application, instead of using separate REST APIs, you can use the permission handler https://github.com/nilasini/CustomPermissionClaimHandler to include user's permissions into the ID token.
If you want to get a user's permission through a REST API, there is no one single API to get that. The option is,
https://<host>:<port>/scim2/Users/<user-id>?attributes=roles
(This can be invoked by a privileged user to get another user's assigned roles)https://<host>:<port>/scim2/Me?attributes=roles
(Loggegin user can get his own roles)https://<host>:<port>/scim2/Roles/<role-id>?attributes=permissions
Here is a reference for the mentioned scim REST APIs: https://is.docs.wso2.com/en/latest/apis/scim2-rest-apis/