Reading Rules Through Code


#1

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 ?

Russell


#2

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