# 401 error when I run Elasticsearch queries from sublime

**URL:** <https://discuss.elastic.co/t/401-error-when-i-run-elasticsearch-queries-from-sublime/90458>\
**Category:** Elasticsearch\
**Created:** [June 22, 2017, 1:16pm UTC](https://discuss.elastic.co/t/401-error-when-i-run-elasticsearch-queries-from-sublime/90458 "2017-06-22T13:16:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![durantto](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@durantto](https://discuss.elastic.co/u/durantto)\
**Post date:** [June 22, 2017, 1:16pm UTC](https://discuss.elastic.co/t/401-error-when-i-run-elasticsearch-queries-from-sublime/90458/1 "2017-06-22T13:16:43Z")

</div>

Elastic: 5.4.2  
Kibana: 5.4.2  
Logstash: 5.4.2  
Plugins: X-pack

Hello all,

I like working in sublime with json queries. But with the new version of Elastic with X-pack I get an error when I run:

```
{"query":{"match_all":{}}}

```

The error is:

```
Error: TransportError(401, 'security exception')

```

The plugin is kind of old and isn't maintained anymore. But, there should be a way to configure a client (without using a language wrapper like Python or C#) to have authentication. So, any thoughts on how I could manually configure this? There is a config looking snippet that it uses and I wonder if there are security attributes I could put in there.

```
{
"base_url": "http://localhost:9200",
"index": "blog",
"doc_type": "posts",
"servers": [
  {
      "base_url": "http://localhost:9200",
      "index": "blog",
      "doc_type": "posts",
  },
  {
      "base_url": "http://localhost:9200",
      "index": "twitter",
      "doc_type": "tweets",
  }
]
}

```

Thanks in advance,

TD

---

<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:** [July 20, 2017, 1:20pm UTC](https://discuss.elastic.co/t/401-error-when-i-run-elasticsearch-queries-from-sublime/90458/2 "2017-07-20T13:20:47Z")

</div>

Closed on July 20, 2017, 1:20pm UTC

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