# Error 400(Bad request)

**URL:** <https://community.postman.com/t/error-400-bad-request/39583>\
**Category:** Help Hub\
**Created:** [September 29, 2022, 7:37am UTC](https://community.postman.com/t/error-400-bad-request/39583 "2022-09-29T07:37:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ninacko](https://avatars.discourse-cdn.com/v4/letter/n/f4b2a3/32.png) [@ninacko](https://community.postman.com/u/ninacko)\
**Post date:** [September 29, 2022, 7:37am UTC](https://community.postman.com/t/error-400-bad-request/39583/1 "2022-09-29T07:37:27Z")

</div>

I got Error 400(Bad request) and i just get started so I don’t know what should I do to solve this problem i working on ubuntu i don’t think it’s a bug from ubuntu but i want to tell u just for make sure there is any problem from using ubuntu

This is my code

```auto
exports.createScream = functions.https.onRequest((req, res) => {
  const newScream = {
    body: req.body.body,
    userHandle: req.body.userHandle,
    createAt: admin.firestore.Timestamp.fromDate(new Date()),
  };

  admin.firestore()
      .collection("scream")
      .add(newScream)
      .then((doc) => {
        res.json({message: `document ${doc.id} created successfully`});
      })
      .catch((err) => {
        res.status(500).json({error: "something went wrong"});
        console.error(err);
      });
});

```

and this is my error

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/b/e/be10b5737b6cc07e0ea68c9fecae1cdf1b810c7b.png)

and this for my header

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/7/f/7f73945bd79ab58932be0fd5ac1e5af74c900de4.png)

i already check the url and clear the cache i don’t know how should i do next

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [September 29, 2022, 8:55am UTC](https://community.postman.com/t/error-400-bad-request/39583/2 "2022-09-29T08:55:22Z")

</div>

Hi @ninacko

Is there any documentation for this endpoint?  
What should the request look like? is it missing anything like auth?

---

<div class="post-metadata">

**Author:** ![ninacko](https://avatars.discourse-cdn.com/v4/letter/n/f4b2a3/32.png) [@ninacko](https://community.postman.com/u/ninacko)\
**Post date:** [October 2, 2022, 4:29am UTC](https://community.postman.com/t/error-400-bad-request/39583/3 "2022-10-02T04:29:38Z")

</div>

Damn I’m really dumb I think I already change It to post, so I don’t recheck it thank bud you so kind
