0

I am trying to check if a contact exist already before creating it.

below is a sample of my code,

$contact_fields_index = array("name"=>"Paul Pierre", "mail"=>"paul@barnardmail.net");
$existingContacts = PodioContact::get_for_app( $PODIO_APPID , $contact_fields_index);

$existingContacts is always empty, even though the contact exists in the workspace.

What am I doing wrong ?

  • What happens when you use the general Get Contact operation instead of the one that's scoped down to a specific app? Details: https://developers.podio.com/doc/contacts/get-contacts-22400 – Andreas Haugstrup Pedersen Oct 07 '14 at 04:04

1 Answers1

0

I suspect your mail might be not matching, or your name. Did you try without the attributes parameter? For example:

$existingContacts = PodioContact::get_for_app( $PODIO_APPID );

That should bring back all contacts and when output the $existingContacts array you can see if the one you are looking for is in there.

aharkin
  • 15
  • 3