Hey All,
I have been running into an issue where I am using an API key to CRUD users and tickets. When I try to add a note I am able to insert it onto a ticket, but I am not able to override the 'user_id' parameter to allow me to post as another user.
I am using the following code for the response:
//verifyFreshdeskUser returns a GET /contacts.json?query='email is <email>'&state='all'
$response = json_decode(json_encode(verifyFreshdeskUser(<email>)), true);
$id = $response[0]['user']['id'];
$note = array(
"helpdesk_note" => array(
"user_id" => $id,
"body" => "It works!"
)
);
The result is the user associated with the API key is associated with the note by default. I have also attempted to use a username/password combination instead of the API key, but get an 'Access Denied' response.
I would expect this to also work as based on the response from this post:
https://support.freshdesk.com/support/discussions/topics/2259
Any advice or suggestions as to how to troubleshoot this issue or would this be a bug?
Thanks,
Peter