Getting error while calling Search rest API "{[Errors, An unexpected error prevented your requested action from completing. The error has been logged for the administrator to review.]}

We have integrated Telligent in Sitecore application through REST API. Now we are trying to develop Search functionality but we got unexpected error and not able to get the search result.

Below is the code,

var host = new ClientCredentialsRestHost(Context.User.LocalName, Settings.GetSetting("CommunityUrl"), Settings.GetSetting("ClientId"), Settings.GetSetting("ClientSecret"));
var withingOptions = new NameValueCollection
{
    {"Query", "disscussion" },
    {"Category", "forum"},
};
var endpoint = "search.json?" + ParseQueryString(withingOptions);
var response = host.GetToDynamic(2, endpoint);

In response we are getting below error,

"{[Errors, An unexpected error prevented your requested action from completing. The error has been logged for the administrator to review.]}

Is there any setting we need to do in community to access Search results? Can anyone please help us? 

It would be great if someone can share a sample code of implementing Search REST API in web application.

Parents Reply Children