# Basic Authentication not working via python client

**URL:** <https://discuss.elastic.co/t/basic-authentication-not-working-via-python-client/301435>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [April 3, 2022, 7:17pm UTC](https://discuss.elastic.co/t/basic-authentication-not-working-via-python-client/301435 "2022-04-03T19:17:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sethmlarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sethmlarson/32/93342_2.png) [@sethmlarson](https://discuss.elastic.co/u/sethmlarson)\
**Post date:** [April 3, 2022, 7:57pm UTC](https://discuss.elastic.co/t/basic-authentication-not-working-via-python-client/301435/2 "2022-04-03T19:57:47Z")

</div>

Hello! What is the major version of the libary you're using (`elasticsearch. __version__ `)?

If it starts with `7...` then you should use `http_auth=("username", "password")` instead of `basic_auth=...`. The `basic_auth=...` parameter was only added in v8.0.0.

---

_[View the full topic](https://discuss.elastic.co/t/basic-authentication-not-working-via-python-client/301435)._
