# 401 Unauthorized for /bonita/API/bpm/userTask/80019/execution

**URL:** https://community.ofelia.com/t/401-unauthorized-for-bonita-api-bpm-usertask-80019-execution/9733
**Category:** Q&A
**Created:** [11 July 2019 05:52 UTC](https://community.ofelia.com/t/401-unauthorized-for-bonita-api-bpm-usertask-80019-execution/9733 "2019-07-11T05:52:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![anil\_kumar.tummidi\_1](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anil\_kumar.tummidi\_1](https://community.ofelia.com/u/anil_kumar.tummidi_1)
#### Post date: [11 July 2019 05:52 UTC](https://community.ofelia.com/t/401-unauthorized-for-bonita-api-bpm-usertask-80019-execution/9733/1 "2019-07-11T05:52:19Z")

</div>

Bonita BPM Studio Version: 7.8.4  
I have create a new instance of a process and trying to complete them using Rest APIs using postman as Rest Client. Steps followed

1. Login in using the task onwer credentials , _helen.kelly_  
POST /bonita/loginservice

Task and Owner Details:  
Task Details:80019

{  
“displayDescription”: “”,  
“executedBy”: “0”,  
“rootContainerId”: “4007”,  
“assigned\_date”: “2019-07-11 10:48:16.613”,  
“displayName”: “Review Request”,  
“executedBySubstitute”: “0”,  
“dueDate”: “”,  
“description”: “”,  
“type”: “USER\_TASK”,  
“priority”: “normal”,  
“actorId”: “410”,  
“processId”: “8955091866381748903”,  
“caseId”: “4007”,  
“name”: “Review Request”,  
“reached\_state\_date”: “2019-07-11 10:48:16.615”,  
“rootCaseId”: “4007”,  
“id”: “80019”,  
“state”: “ready”,  
“parentCaseId”: “4007”,  
“last\_update\_date”: “2019-07-11 10:48:16.615”,  
“assigned\_id”: “3”  
}  
User Details:  
User Details:

{  
“firstname”: “Helen”,  
“icon”: “icons/default/icon\_user.png”,  
“creation\_date”: “2019-07-03 08:21:19.173”,  
“userName”: “helen.kelly”,  
“title”: “Mrs”,  
“created\_by\_user\_id”: “-1”,  
“enabled”: “true”,  
“lastname”: “Kelly”,  
“last\_connection”: “2019-07-11 10:48:07.211”,  
“password”: “”,  
“manager\_id”: “1”,  
“id”: “3”,  
“job\_title”: “Human resource manager”,  
“last\_update\_date”: “2019-07-03 08:21:19.173”  
}

1. Executing the Task  
POST /bonita/API/bpm/userTask/80019/execution  
POST /bonita/API/bpm/userTask/80019/execution HTTP/1.1  
Content-Type: application/json  
User-Agent: PostmanRuntime/7.15.2  
Accept: _/_  
Cache-Control: no-cache  
Postman-Token: 44c62873-dda3-45da-9008-292d8d56881f  
Host: localhost:8080  
Cookie: bonita.tenant=1; X-Bonita-API-Token=ec41d0ac-1686-4b29-b89a-a53b6fb0a93b; JSESSIONID=A56D85A14A1F326AFF1E475405498C8F  
Accept-Encoding: gzip, deflate  
Content-Length: 45  
Connection: keep-alive

Response

HTTP/1.1 401

---

<div class="post-metadata">

### Author: ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)
#### Post date: [30 September 2019 11:38 UTC](https://community.ofelia.com/t/401-unauthorized-for-bonita-api-bpm-usertask-80019-execution/9733/2 "2019-09-30T11:38:56Z")

</div>

What I can suggest to investigate the issue is to try to perform the task using Bonita Portal and compare the REST request sent by the Portal with the one you are sending. You can get information about the request sent by the Portal using the web developer tools of your web browser.

My first guess was that the task was not assigned but according to the JSON you shared the tasked is correctly assigned to Helen Kelly (`"assigned_id": "3"`).
