REST API for task update

REST API for task update

Hi,

I'm new to SD Plus and have been playing around with the REST API. I have been able to create new r tasks with the API key generated. However, when I try to update the request with the same key, I am getting an error stating:
{
  "response_status": {
    "status": "failed",
    "messages": [
      {
        "type": "failed",
        "message": "Technician key in the request is invalid. Unable to authenticate.",
        "status_code": "401"
      },
      {
        "type": "failed",
        "message": "Error when trying to receive technician information.",
        "status_code": "401"
      }
    ]
  }
}

The parameters that I am submitting are as follows using Powershell:
$taskJson = @"
{
  "task": {
    "actual_end_time": {
      "value": "1496313815044"
    },
    "status": {
      "name": "Closed"
    }
  }
}
"@

 $params = @{INPUT_DATA=$taskJson;TECHNICIAN_KEY=$apiToken;format='json'}
 ConvertFrom-Json (Invoke-WebRequest -Uri " http://192.168.137.253:8080/api/v3/tasks/28" -Method PUT -Body $params)


Would appreciate any assistance to highlight why this might be a problem.

Thanks in advance.

                  New to ADSelfService Plus?