<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;" class="">Hi,<div class=""><br class=""></div><div class="">I am trying to use impersonate feature using my java client. When I call impersonate api using admin access grant. I get back the cookies. How can I get the access token for the impersonate user.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; line-height: normal; font-family: Monaco;">HttpPost <span class="" style="color: rgb(126, 80, 79);">post</span> = <span class="" style="color: rgb(147, 26, 104);">new</span> HttpPost(</div><div class="" style="margin: 0px; line-height: normal;"><font face="Monaco" class=""> KeycloakUriBuilder.fromUri(</font><span class="" style="font-family: Monaco; color: rgb(126, 80, 79);">authServerUrl</span><font face="Monaco" class="">).path(</font><font color="#0326cc" face="Monaco" class="">“</font><span class="" style="color: rgb(57, 51, 255); font-family: Monaco;">/admin/realms/{realm}/users/{id}/impersonation</span><font color="#0326cc" face="Monaco" class="">"</font><font face="Monaco" class="">).build(</font><span class="" style="font-family: Monaco; color: rgb(126, 80, 79);">realm</span><font face="Monaco" class="">, </font><span class="" style="font-family: Monaco; color: rgb(126, 80, 79);">accountKeycloakId</span><font face="Monaco" class="">));</font></div></div><div class="" style="margin: 0px; line-height: normal;"><font face="Monaco" class=""><br class=""></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Monaco" class="">This is returning me cookies. In next step I would like to get the access token of impersonate user.</font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Monaco" class=""><br class=""></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Monaco" class="">Thanks</font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Monaco" class="">A</font></div></body></html>