1

When I run the API command (via CiviCRM API Explorer) to list all the "Mailing Lists" i.e.

$result = civicrm_api3('Group', 'get', ['group_type' => "Mailing List"]);

I get the full list of mailing list groups. However if I run the with "LIKE" filtering option instead of "=", i.e:

$result = civicrm_api3('Group', 'get', ['group_type' => ['LIKE' => "Mailing List"],]);

I don't get any results and the console suggests that i hit a 403 error, which indicates this is a permission problem. I am running this as an administrator so I should have full access to the system.

Any suggestions on how to address this issue are welcome.I am running CiviCRM 5.18.4 on Wordpress 5.2.4.

  • in database 'group_type' stored the value of "Mailing List". if you want to use like operator, then try 'group_type' => ['LIKE' => "%2%"], 2 is value of 'Mailing List', 1 is value of 'Access Control' – Sunil Pawar Oct 31 at 13:23
  • Curious as to why you would want to do a LIKE on group_type?? LIKE on a group name makes sense, or using IN with group_type. – Aidan Nov 1 at 15:45
  • Thanks for the comments, however they don't really address the baseline issue. I do actually get 403 error for all "LIKE' tests for additional group parameters (type, name, etc.). The type is most important as it has been identified as the cause of the problem with listing recipient groups I reported as gitlab issue report: lab.civicrm.org/dev/mail/issues/54#note_25897 and here: civicrm.stackexchange.com/questions/33070/… – Marian Zastawny Nov 3 at 20:49
1

Turns out this was caused by some server settings by my hosting provider (apparently they did some changes to the firewall). They managed to fix it and it seems to be working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.