Gpt 4 Assistant Node 'missing_required_parameter' Content

Hi, i use Firebase Cloud Function and React for my project.
i keep getting this error in my functions console and error 500:

 error: {
 message: "Missing required parameter: 'content'.",
'invalid_request_error',
 param: 'content',
code: 'missing_required_parameter'

I have tried multiple ways to fix this. no luck…
front-end code sends messages as content and here is the code from the function

try {
      const decodedToken = await admin.auth().verifyIdToken(idToken);
      const userId = decodedToken.uid;

      // Create a Thread
      const thread = await openai.beta.threads.create();

      // Add user message to the Thread
      const userMessage = req.body.message;
      await openai.beta.threads.messages.create(thread.id, {
        role: 'user',
        content: userMessage,
      });


I use the latest Node SDK and I’m trying to create an Assistant base on GPT 4 turbo.
thank you

I’m having the same problem but I’m using PHP and cURL and posting these values:

{
    "thread_id": "$fncThreadId",
    "run_id": "$fncRunId",
    "after": "$fncLastMsgId",
    "role": "assistant",
    "limit": 5,
    "order": "asc"
}

Are you sure userMessage contains data?