# Error 414 when posting/updating via API

**URL:** <https://meta.discourse.org/t/error-414-when-posting-updating-via-api/98186>\
**Category:** Self-hosting\
**Created:** [27.Сентябрь.2018 09:30:47 UTC](https://meta.discourse.org/t/error-414-when-posting-updating-via-api/98186 "2018-09-27T09:30:47Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [02.Апрель.2020 17:50:06 UTC](https://meta.discourse.org/t/error-414-when-posting-updating-via-api/98186/16 "2020-04-02T17:50:06Z")

</div>

Однако они пытаются использовать Python, а не curl.

Приведённый выше пример содержит правильные заголовки.

> [@marcozambi](#):
>
> headers = { ‘Content-Type’: ‘application/json’, ‘Api-key’: envDiscourseKey, # API-ключ передаётся в этой переменной ‘Api-username’: envDiscourseUsername # Пользователь API передаётся в этой переменной }

---

_[View the full topic](https://meta.discourse.org/t/error-414-when-posting-updating-via-api/98186)._
