<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi again,<br><br>a requirement of the application I am working on is for one person to very easily be able to add another using their email address.<br><br>We must not use the keycloak realm registration page and so I was wondering what the best way to proxy a realm user registration is?<br><br>I am trying to use the rest api like this<br><br>----<br><br>HttpPost post = new HttpPost(<br> KeycloakUriBuilder<br> .fromUri("<a href="http://localhost:8080/auth">http://localhost:8080/auth</a>")<br> .path("/realms/shift/tokens/registrations")<br> .queryParam("client_id","security-admin-console")<br> .build());<br><br> List<NameValuePair> formparams = new ArrayList<>();<br><br> formparams.add(new BasicNameValuePair("username", user.getEmail()));<br> formparams.add(new BasicNameValuePair("password", user.getPassword()));<br> formparams.add(new BasicNameValuePair("email",user.getEmail()));<br><br> UrlEncodedFormEntity form = new UrlEncodedFormEntity(formparams, "UTF-8");<br> post.setEntity(form);<br><br> HttpResponse response = client.execute(post);<br><br>——<br><br>But I am not sure what the returned entity is, nor how to get the ID of the newly registered user.<br><br>Is there another way to do this? <br><br>Any help would be greatly appreciated<br><br>Thanks<br><br><br>Conrad</body></html>