CIVICRM References SF ISSUE
I want to display all REFERENCES SF on front-end of login user's dashboard with contact ID in wordpress but I am unable to display REFERENCES SF.
whenever I login with admin and hit below url with php function "file_get_contents" then it return data in json formate and logout from admin then it does not return any data.I think civicrm check admin login.
I have used below code as well but I am unable to get REFERENCES SF. Please check and confirm where I am lacking and which code good to go with. Please guide me as I am stuck in it badly .
contact_id = get_user_meta(
userID, 'contact_id', true);
require_once WP_PLUGIN_DIR . '/civicrm/civicrm/api/class.api.php';
civicrm_initialize();
$result = civicrm_api3(
'Contact',
'get',
[
'sequential' => 1,
'return' => [
"custom_23",
"custom_16",
"organization_name",
"custom_17",
"email",
"phone",
"custom_29",
"custom_25",
"custom_26",
"custom_27",
"custom_24",
"custom_22",
"custom_21",
"custom_20",
"custom_19",
"custom_18",
"custom_28",
"city",
"street_address",
"address_id"
],
'id' => $contact_id,
]
);