I am currently trying to create a participant on a Drupal form submit, when i do this I get an error saying Authorization failed. I've tried managing the ACLs in Civi with no success, I've also changed the drupal roles to allow anyone to add a participant. I've also tried to set the permissions manually using the code below

hook_civicrm_alterAPIPermissions($entity, $action, &$params, &$permissions) {
  $permissions['Participant'] = array(
    'get' => array(
      'access CiviCRM',
      'access CiviEvent',
      'edit all events',

but this didn't work either

If anyone has any suggestions it would be a great help, I can supply more information if needed

thanks in advanced!

EDIT: I found that I needed to allow users access to the backend of civi to get this to work, this is not ideal so I am still looking for workarounds

  • I am currently trying to create a participant on a Drupal form submit - can you share the code of this part so we can see where the error is being generated? Nov 8 '19 at 12:03
  • Do you have solution im have same problem with permission and api4 ? Nov 19 '19 at 10:14
  • So my current workaround for this was to check the permissions to access all civicrm api which gives the user access to the civicrm backend which isn't ideal, however I think you can do the same stuff with api 3 without having to give the user access to civi
    – someone
    Nov 20 '19 at 11:05

Your Answer

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

Browse other questions tagged or ask your own question.