I am trying to validate a username and password using this documentation for the REST API in Telligent Evolution 6.1.
The UploadData call (see above link) throws a "(500) Internal Server Error" for any username and password combo.
Here is the code I am using; it is almost identical to the above link:
var webClient = new WebClient();
string adminKey = String.Format("{0}:{1}", "mykey", "my username");
string adminKeyBase64 = Convert.ToBase64String(Encoding.UTF8.GetBytes(adminKey));
webClient.Headers.Add("Rest-User-Token", adminKeyBase64);
webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
string requestUrl = "http://myactualsite.com/api.ashx/v2/users/validate.json";
string data = "?Username=" + username + "&Password=" + password;
webClient.UploadData(requestUrl, "POST", Encoding.ASCII.GetBytes(data));
Also, what is actually returned by UploadData? I'm guessing its the JSON/XML response as a byte array, but the documentation doesn't make any reference to setting this byte array to a variable for later use.
Thanks for any help.