# { "code": 400, "data": "{\\"code\\":300,\\"message\\":\\"Validation Failed.\\",\\"errors\\":\[{\\"field\\":\\"message\\",\\"message\\":\\"Missing field.\\"}\]}" }

**URL:** <https://devforum.zoom.us/t/code-400-data-code-300-message-validation-failed-errors-field-message-message-missing-field/58055>\
**Category:** API and Webhooks\
**Created:** [September 27, 2021, 1:43pm UTC](https://devforum.zoom.us/t/code-400-data-code-300-message-validation-failed-errors-field-message-message-missing-field/58055 "2021-09-27T13:43:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ulisses.mesquita](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ulisses.mesquita/32/27108_2.png) [@ulisses.mesquita](https://devforum.zoom.us/u/ulisses.mesquita)\
**Post date:** [September 27, 2021, 1:43pm UTC](https://devforum.zoom.us/t/code-400-data-code-300-message-validation-failed-errors-field-message-message-missing-field/58055/1 "2021-09-27T13:43:14Z")

</div>

When trying to run using a “Sending a Message via chat” API using OAUTH 2.0, the following message is returned:  
{  
“code”: 400,  
“data”: “{” code \ ": 300, " message \ ": " Validation failed. \ ", " errors \ “: [{” field \ ": " message \ ", " message \ ": " Missing field. \ “}]}”  
}

Can you help me with this error?

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [September 27, 2021, 10:40pm UTC](https://devforum.zoom.us/t/code-400-data-code-300-message-validation-failed-errors-field-message-message-missing-field/58055/2 "2021-09-27T22:40:50Z")

</div>

> [@ulisses.mesquita](#):
>
> “Sending a Message via chat” API

Hi @ulisses.mesquita – happy to help! Can you send the full API request path parameter and payload you submitted? For user id and email field values, you can put [REDACTED].

Thanks!

---

<div class="post-metadata">

**Author:** ![ulisses.mesquita](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ulisses.mesquita/32/27108_2.png) [@ulisses.mesquita](https://devforum.zoom.us/u/ulisses.mesquita)\
**Post date:** [September 28, 2021, 12:10pm UTC](https://devforum.zoom.us/t/code-400-data-code-300-message-validation-failed-errors-field-message-message-missing-field/58055/3 "2021-09-28T12:10:43Z")

</div>

Yes No problems.

```auto
Path:https://api.zoom.us/v2/chat/users/me/messages

Headers: 'Authorization' => 'Bearer '.$this->access_token->access_token,
            'Content-Type' => 'application/json',

form_params: 'form_params' => json_encode([
                    'message'=> 'Test Note',
                    'to_contact' => 'henrique.boechat@xpon.com.br',
                ])

```

The message returned is the following error: 400 → Message: code":300,“message”:“Validation Failed.”,“errors”:[{“field”:"message ",“message”:"Missing field.\

---

<div class="post-metadata">

**Author:** ![ulisses.mesquita](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ulisses.mesquita/32/27108_2.png) [@ulisses.mesquita](https://devforum.zoom.us/u/ulisses.mesquita)\
**Post date:** [September 30, 2021, 3:49pm UTC](https://devforum.zoom.us/t/code-400-data-code-300-message-validation-failed-errors-field-message-message-missing-field/58055/4 "2021-09-30T15:49:39Z")

</div>

Hi, can you help me?

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [October 4, 2021, 9:43pm UTC](https://devforum.zoom.us/t/code-400-data-code-300-message-validation-failed-errors-field-message-message-missing-field/58055/5 "2021-10-04T21:43:06Z")

</div>

Hey @ulisses.mesquita,

I’m not immediately seeing an issue with this. Can you provide the encoded JSON? I want to make sure that it isn’t being generated as a hashed array and is instead an object.

Further, make sure that you are sending the JSON in the POST body.

Let me know if that helps.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 4, 2021, 7:43am UTC](https://devforum.zoom.us/t/code-400-data-code-300-message-validation-failed-errors-field-message-message-missing-field/58055/6 "2021-11-04T07:43:34Z")

</div>

Closed on November 4, 2021, 7:43am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
