2022 Developer Survey is open! Take survey.

New answers tagged

3 votes
Accepted

Is the use of API4 already recommended?

See https://lab.civicrm.org/dev/core/-/issues/2486 but I believe all of those things are deprecated anyway (or on the way to being deprecated) and the idea is to use Order and Payment: https://docs....
user avatar
  • 17.6k
0 votes
Accepted

API4 PHP Fatal error Uncaught API_Exception Authorization failed

Because you're using a manual way to bootstrap civi (as opposed to e.g. running your script with cv scr --user=admin), you need to either add code in there to also "log in" as a user, or you ...
user avatar
  • 17.6k
2 votes

Using API4 to get contact based on email match

So @Demerit's answer above was exactly what I needed to understand how to connect the two tables together (email table and contact info table). I am posting my answer for other noobs that are trying ...
user avatar
  • 301
1 vote
Accepted

Using API4 to get contact based on email match

Unless you have a complex join, it's simply a matter of referencing contact_id (the literal string prefix contact_id., not a numeric contact id) in the select() or where() to create the join, e.g. $x =...
user avatar
  • 17.6k

Top 50 recent answers are included