# Python Authentication Problem

**URL:** <https://discuss.elastic.co/t/python-authentication-problem/343775>\
**Category:** Elasticsearch\
**Created:** [September 25, 2023, 2:06pm UTC](https://discuss.elastic.co/t/python-authentication-problem/343775 "2023-09-25T14:06:18Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 30, 2023, 1:38pm UTC](https://discuss.elastic.co/t/python-authentication-problem/343775/16 "2023-09-30T13:38:12Z")

</div>

Do you know which version of the Elasticsearch python library are you using?

Try to change `basic_auth` to `http_auth` and see if it works.

According to this [post](https://discuss.elastic.co/t/basic-authentication-not-working-via-python-client/301435/2), if you are using the version 7 of the library, the parameter `basic_auth` does not exists, you need to use `http_auth`.

---

_[View the full topic](https://discuss.elastic.co/t/python-authentication-problem/343775)._
