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

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?

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!

Yes No problems.

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.\

Hi, can you help me?

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

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