# How to create a user with the security API in ElasticSearch create a user with Node JS Client?

**URL:** <https://discuss.elastic.co/t/how-to-create-a-user-with-the-security-api-in-elasticsearch-create-a-user-with-node-js-client/303017>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, language-clients\
**Created:** [April 22, 2022, 10:39am UTC](https://discuss.elastic.co/t/how-to-create-a-user-with-the-security-api-in-elasticsearch-create-a-user-with-node-js-client/303017 "2022-04-22T10:39:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurabh24](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@Saurabh24](https://discuss.elastic.co/u/Saurabh24)\
**Post date:** [April 22, 2022, 10:39am UTC](https://discuss.elastic.co/t/how-to-create-a-user-with-the-security-api-in-elasticsearch-create-a-user-with-node-js-client/303017/1 "2022-04-22T10:39:45Z")

</div>

> **[Create or update users API | Elasticsearch Guide \[8.1\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html)**

The user is not getting created when the security API is used to create a user with the help of Node JS client. Can you please specify a code snippet or an example?

---

<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:** [May 20, 2022, 10:39am UTC](https://discuss.elastic.co/t/how-to-create-a-user-with-the-security-api-in-elasticsearch-create-a-user-with-node-js-client/303017/2 "2022-05-20T10:39:53Z")

</div>

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