How to get user roles using api call?

Hello everyone,

I am developing a mobile app that uses auth0 to authenticate users. To do this, with the email and password I create the following body and make a post in : https://{mydomain}/oauth/token

{
“grant_type”: “http://auth0.com/oauth/grant-type/password-realm”,
“username”: “”,
“password”: “”,
“client_id”: “myclientid”,
“client_secret”: “myclientsecret”,
“audience”: “https://{mydomain}/api/v2/”,
“scope”: “openid profile email”,
“connection”: “Username-Password-Authentication”,
“realm”: “Username-Password-Authentication”
}

With this I obtain an accessToken, which I use to make a post in:
https://{mydomain}/userinfo

And in this way obtain the user’s data.

But you would need to be able to obtain the user’s roles and permissions, or the necessary scope to be able to use the api: https://login.auth0.com/api/v2/users/{USER_ID}/roles

Thanks!!