# What is wrong with my HTTP request to place an order?

**URL:** <https://forum.alpaca.markets/t/what-is-wrong-with-my-http-request-to-place-an-order/10474>\
**Category:** Alpaca Trading\
**Created:** [August 29, 2022, 11:44pm UTC](https://forum.alpaca.markets/t/what-is-wrong-with-my-http-request-to-place-an-order/10474 "2022-08-29T23:44:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wdk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/wdk/32/4337_2.png) [@wdk](https://forum.alpaca.markets/u/wdk)\
**Post date:** [August 29, 2022, 11:44pm UTC](https://forum.alpaca.markets/t/what-is-wrong-with-my-http-request-to-place-an-order/10474/1 "2022-08-29T23:44:16Z")

</div>

Hello,

I’m trying to make my first live order with Alpaca, but I’m getting stopped by HTTP. I can query my account status just fine, but it tells me I’m not authorized (401) to place an order.

Below is what the header looks like. Can you spot what is wrong?

```auto
POST /v2/orders HTTP/1.1
Host: api.alpaca.markets
User-Agent: libcurl/7.84.0
Accept: */*
Accept-Encoding: deflate, gzip
APCA-API-KEY-ID: ******
APCA-API-SECRET-KEY: ******
Content-Type: application/json
Content-Length: 119

```

And here is the JSON payload I am trying to send.

```auto
{"symbol":"AAPL","qty":null,"notional":"20","side":"buy","type":"market","time_in_force":"day","extended_hours":"true"}

```

I am able to see my account status just fine, so my keys appear to be still valid.
