<div dir="ltr"><span style="font-size:12.8px">Hi,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">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 style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div style="margin:0px;font-family:Monaco">HttpPost <span style="color:rgb(126,80,79)">post</span> = <span style="color:rgb(147,26,104)">new</span> HttpPost(</div><div style="margin:0px"><font face="Monaco">                    KeycloakUriBuilder.fromUri(</font><span style="font-family:Monaco;color:rgb(126,80,79)">authServerUrl</span><font face="Monaco">).path(</font><font color="#0326cc" face="Monaco">“</font><span style="color:rgb(57,51,255);font-family:Monaco">/admin/realms/{realm}/users/{id}/impersonation</span><font color="#0326cc" face="Monaco">&quot;</font><font face="Monaco">).build(</font><span style="font-family:Monaco;color:rgb(126,80,79)">realm</span><font face="Monaco">, </font><span style="font-family:Monaco;color:rgb(126,80,79)">accountKeycloakId</span><font face="Monaco">));</font></div></div><div style="font-size:12.8px;margin:0px"><font face="Monaco"><br></font></div><div style="font-size:12.8px;margin:0px"><font face="Monaco">This is returning me cookies. In next step I would like to get the access token of impersonate user.</font></div><div style="font-size:12.8px;margin:0px"><font face="Monaco"><br></font></div><div style="font-size:12.8px;margin:0px"><font face="Monaco">Thanks</font></div><div class="" style="font-size:12.8px"></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 3:25 PM, Anshul Malpani <span dir="ltr">&lt;<a href="mailto:anshulm@stytch.com" target="_blank">anshulm@stytch.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>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><br></div><div><br></div><div><br></div><div><div style="margin:0px;line-height:normal;font-family:Monaco">HttpPost <span style="color:#7e504f">post</span> = <span style="color:#931a68">new</span> HttpPost(</div><div style="margin:0px;line-height:normal"><font face="Monaco">                    KeycloakUriBuilder.fromUri(</font><span style="font-family:Monaco;color:rgb(126,80,79)">authServerUrl</span><font face="Monaco">).path(</font><font color="#0326cc" face="Monaco">“</font><span style="color:rgb(57,51,255);font-family:Monaco">/admin/realms/{realm}/users/{id}/impersonation</span><font color="#0326cc" face="Monaco">&quot;</font><font face="Monaco">).build(</font><span style="font-family:Monaco;color:rgb(126,80,79)">realm</span><font face="Monaco">, </font><span style="font-family:Monaco;color:rgb(126,80,79)">accountKeycloakId</span><font face="Monaco">));</font></div></div><div style="margin:0px;line-height:normal"><font face="Monaco"><br></font></div><div style="margin:0px;line-height:normal"><font face="Monaco">This is returning me cookies. In next step I would like to get the access token of impersonate user.</font></div><div style="margin:0px;line-height:normal"><font face="Monaco"><br></font></div><div style="margin:0px;line-height:normal"><font face="Monaco">Thanks</font></div><span class="HOEnZb"><font color="#888888"><div style="margin:0px;line-height:normal"><font face="Monaco">A</font></div><div style="margin:0px;line-height:normal"><font face="Monaco"><br></font></div><div style="margin:0px;line-height:normal"><font face="Monaco"><br></font></div></font></span></div></blockquote></div><br></div>