I have solved the anonymous authorization problem. The problem was the JSON-RPC request format in the Cortex API. We need to use the “params” keyword for passing the parameters. But “params” is a reserved keyword in C#. Therefore, you can not use the “params” keyword as a member name in a class. Therefore, I have used “parameters” instead of “params”, and then replaced the “parameters” keyword with “params” at the last stage. Here is the code excerpt:
string str1 = JsonConvert.SerializeObject(Request,settings);
string reqStr = str1.Replace("parameters", "params");