0

I'm retrieving event details for a plugin, and thanks to some help here, I am now using the correct API to access the information. However, I am currently using the following to generate a registration link for an event, but I'd like to do the same using APIv4. I've searched the API reference and the API Explorer, with no luck.

        $id = $event['id'];
        $reglink = CRM_Utils_System::url( 'civicrm/event/register', "reset=1&id=$id" );

1 Answer 1

1

There isn't any option in the API to generate registration link, the code you are using should create the correct link

 $id = $event['id'];
 $reglink = CRM_Utils_System::url('civicrm/event/register', "reset=1&id={$id}");
1
  • Ok. Thank you. I assumed this utility would be replaced by some call to the API, but if this still valid, I will stick with it. Thank you. Commented Jan 30, 2023 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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