<h3>GetUserByUsername</h3>
URI <span style=”color: #a31515;”>GET rest/v1/users?username{userName}</span>

<strong>Returns </strong>– A <span style=”color: #2b91af;”>UserResponse</span> containing a User Object in the Users array.  (See RequestResponse in Appendix B)

<strong>Parameters</strong>
<table class=”style-2″>
<tbody>
<tr>
<th>Name</th>
<th><em>Type</em></th>
<th>Description</th>
</tr>
<tr>
<td>encryptedToken</td>
<td><em>string</em></td>
<td align=”left”>Required. Encrypted Token returned from client
authentication. Returns null if token has expired or
is invalid.</td>
</tr>
<tr>
<td>username</td>
<td><em>string</em></td>
<td align=”left”>Required. The email address of the requested
user.</td>
</tr>
</tbody>
</table>
&nbsp;

<strong>Example </strong>– C#
[gdlr_notification icon=”none” type=”color-border” border=”#31BEF9″ color=”#000000″]
<span style=”color: #0000ff;”>string </span>uri = <span style=”color: #a31515;”>”rest/v1/users?username{0}”</span>
<span style=”color: #2b91af;”>JavaScriptSerializer </span>jss = <span style=”color: #0000ff;”>new</span> <span style=”color: #2b91af;”>JavaScriptSerializer</span>();
<span style=”color: #0000ff;”>string</span> responseString = <span style=”color: #0000ff;”>string</span>.Empty;
<span style=”color: #2b91af;”>UserResponse</span> userResponse;

uri = <span style=”color: #0000ff;”>string</span>.Format(uri, username);

<span style=”color: #2b91af;”>HttpWebRequest</span> request = (<span style=”color: #2b91af;”>HttpWebRequest</span>)<span style=”color: #2b91af;”>WebRequest</span>.Create(host + uri);
request.Headers.Add<span style=”color: #800000;”>(“Authorization”</span> , encryptedToken);
request.Method = <span style=”color: #a31515;”>”GET”</span>;
request.ContentType = <span style=”color: #a31515;”>”application/json”</span>;

<span style=”color: #008080;”>HttpWebResponse</span> response = (<span style=”color: #008080;”>HttpWebResponse</span>)request.GetResponse();
responseString = <span style=”color: #0000ff;”>new</span> <span style=”color: #008080;”>StreamReader</span>(response.GetResponseStream()).ReadToEnd();
userResponse = jss.Deserialize&lt;<span style=”color: #008080;”>UserResponse</span>&gt;(responseString);

[/gdlr_notification]