# Http trace for a post

**URL:** <https://meta.discourse.org/t/http-trace-for-a-post/62993>\
**Category:** Development\
**Created:** [19 Maggio 2017, 2:45am UTC](https://meta.discourse.org/t/http-trace-for-a-post/62993 "2017-05-19T02:45:05Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![gchiu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gchiu/32/95856_2.png) [@gchiu](https://meta.discourse.org/u/gchiu)\
**Post date:** [20 Maggio 2017, 2:15am UTC](https://meta.discourse.org/t/http-trace-for-a-post/62993/5 "2017-05-20T02:15:15Z")

</div>

> That would work, but it actually said:

> Bad csrf token when making api request  
> api\_key and api\_username are POST parameters, not headers.  
> so you can put the api\_key and api\_username in the POST body not in the header.

I must have linked to the wrong post. The one I read said that credentials could not be gleaned from the JSON payload, and you had to also include the api\_key and api\_username in the query string when using the .json endpoint. And it was only then that I managed to get a `HTTP POST` working for my bot.

Since it’s working that way I’m going to leave it like that for the moment though I should probably switch to using HTTPS.

---

_[View the full topic](https://meta.discourse.org/t/http-trace-for-a-post/62993)._
