Reading Rules Through Code


I’m trying to verify that we have rules setup correctly through code and therefore want to use the ClientManager.CreateRulesClient().GetRulesAsync() method however I seem to be getting a 403 error returned from the GetRulesAsync() call:

Squidex.ClientLibrary.Management.IRulesClient rulesClient = this.ClientManager.CreateRulesClient();
ICollection<Squidex.ClientLibrary.Management.RuleDto> rules = await rulesClient.GetRulesAsync(this.AppName);

I know this.ClientManager is initialized properly as I’m using it just before this call with content.

Any pointers ?



You need a client with enough permissions, at least developer permissions.