# Can't get post request error 400 Bad Request

**URL:** <https://forum.alpaca.markets/t/cant-get-post-request-error-400-bad-request/11387>\
**Category:** App-Integration\
**Created:** [December 19, 2022, 1:39pm UTC](https://forum.alpaca.markets/t/cant-get-post-request-error-400-bad-request/11387 "2022-12-19T13:39:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chatofking](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@chatofking](https://forum.alpaca.markets/u/chatofking)\
**Post date:** [December 19, 2022, 1:39pm UTC](https://forum.alpaca.markets/t/cant-get-post-request-error-400-bad-request/11387/1 "2022-12-19T13:39:01Z")

</div>

I want to get access token [Build Your Own Brokerage With FastAPI - Part 1](https://alpaca.markets/learn/build-your-own-brokerage-with-fastapi-part-1/) in the last sessions.

when I try

```auto
import requests

url = "http://127.0.0.1:8000/platform/signup/"

payload = {
  "email": "testing@test.com",
  "password": "password"
}

headers = {
  "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

if response.status_code == 200:
  # Successful request
  data = response.json()
  access_token = data["access_token"]
  refresh_token = data["refresh_token"]
  cognito_user_id = data["cognito_user_id"]
  print(f"Access token: {access_token}")
  print(f"Refresh token: {refresh_token}")
  print(f"Cognito user ID: {cognito_user_id}")
else:
  # Handle error
  print(f"Request failed with status code {response.status_code}")

```

it show error  
`"POST /platform/signup/ HTTP/1.1" 400 Bad Request`  
instead of Response:

```auto
{
  "access_token": "[OMITTED]",
  "refresh_token": "[OMITTED]",
  "cognito_user_id": "[OMITTED]"
}

```

what should I do ??
