403 is authorization related. I believe the user has to have view-realm in order to see realm roles.
Also, you’re using both username/password and client id/secret. You’ll want to pick one, either password grant type or client_credentials grant type. I’d suggest starting with the admin-cli client id, and using your admin username/password.
keycloak.exceptions.KeycloakAuthenticationError: 401: b’{“error”:“invalid_grant”,“error_description”:“Invalid user credentials”}’
But I am using the same credentials I log in with. Also how would I go about adding view-realm to the user. I did not see that option in the admin console?