I am trying to run a cv command for the CiviCRM API.
My command looks like this

/usr/local/bin/php /usr/local/bin/cv  api job.execute --user=USER --cwd=/var/www

My user is cron-user and when I use that I get a Drupal error on screen. The same error that was reviewed here (https://lab.civicrm.org/dev/core/-/issues/2323). Looking into this the error further it is happening in Drupal 9 when my user is not valid or does not have sufficient permissions.

The user has all the permissions for CiviCRM but it does not have any administrative Drupal permissions. When I try and run the command with admin user it works like charm. This works in Drupal 7.

I am trying to figure out what permission in Drupal a user needs to be able to run the API for CiviCRM.

I am using cv version v0.3.9. I have 9.1.10.


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.