Hi there,
I am trying to make an API call to create tasks or calls that are linked to the assigned user.
This is the code that I am using for the actual call, but I am getting an ERROR (403) message.
I have checked the API user and they have full access.
Am I missing something - I am using PHP.
The path that is being called in the $client->request is POST /User/1/Task (the user-id I am trying to use is 1)
I am trying to make an API call to create tasks or calls that are linked to the assigned user.
This is the code that I am using for the actual call, but I am getting an ERROR (403) message.
I have checked the API user and they have full access.
Am I missing something - I am using PHP.
The path that is being called in the $client->request is POST /User/1/Task (the user-id I am trying to use is 1)
Code:
$emailAddress = $response['list'][0]['emailAddress']; $parent = $response['list'][0]['id']; $user = $response['list'][0]['assignedUserId']; if($formEmailAddress !== $emailAddress) { $formerror = 'Sorry, your email address does not match the one of file. Please try again.'; } else { $params = [ 'name' => 'Call Back Requested', 'priority' => 'High', 'parent' => $parent, 'description' => $desc, 'dateStartDate' => $dueDate, ]; } try { $response = $client->request('POST', 'User/' . $user . '/Task', $params); } catch (\Exception $e) { $errorCode = $e->getCode(); $formerror = 'We had an issue processing your request. Please try again later.<br> Error code: ' . $errorCode; }
Comment