# StatusCode:401, Unauthorized - Kibana - API request

**URL:** <https://discuss.elastic.co/t/statuscode-401-unauthorized-kibana-api-request/343899>\
**Category:** Kibana\
**Created:** [September 26, 2023, 2:18pm UTC](https://discuss.elastic.co/t/statuscode-401-unauthorized-kibana-api-request/343899 "2023-09-26T14:18:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tfournier](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@tfournier](https://discuss.elastic.co/u/tfournier)\
**Post date:** [September 26, 2023, 2:18pm UTC](https://discuss.elastic.co/t/statuscode-401-unauthorized-kibana-api-request/343899/1 "2023-09-26T14:18:06Z")

</div>

Hi there,  
I'm not able to find Kibana cases by API request.  
This is the error I get :

> {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}

I'm trying to find cases with this curl :

> curl --user username:password -XGET ".../api/cases/\_find?

I have the same problem when I'm trying with API Key instead of Basic Auth.

I'm on Elasticsearch on premise.

But when I do it with the DevConsole it works with this command with the same user and permissions :

> GET kbn:/api/cases/\_find

Could someone help me with this please ?  
Have a nice day.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 24, 2023, 2:18pm UTC](https://discuss.elastic.co/t/statuscode-401-unauthorized-kibana-api-request/343899/2 "2023-10-24T14:18:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
