Skip to content

Fix typing indicator API request parameter casing#1176

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-typing-indicator-bug
Draft

Fix typing indicator API request parameter casing#1176
Copilot wants to merge 2 commits intomainfrom
copilot/fix-typing-indicator-bug

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

The typingIndicator.create() call was failing with HTTP 400 "invalid or incomplete inbound data in MDR" because request body parameters were sent with wrong casing — Twilio's REST API requires PascalCase keys, but the generated code used lowercase/camelCase.

Changes

  • src/rest/messaging/v2/typingIndicator.ts: Fix request body parameter keys in both create and createWithHttpInfo methods:
    • data["channel"]data["Channel"]
    • data["messageId"]data["MessageId"]

This aligns with the established pattern across the codebase (e.g., channelsSender.ts already uses data["Channel"]) and appears to be a code generation oversight.

// Before (broken)
data["channel"] = params["channel"];
data["messageId"] = params["messageId"];

// After (fixed)
data["Channel"] = params["channel"];
data["MessageId"] = params["messageId"];
Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug Report]: Typing indicator doesn't work</issue_title>
<issue_description>I have this code

const result = await this.client.messaging.v2.typingIndicator.create({
  channel: 'whatsapp',
  messageId,
});

It fails with:

RestException [Error]: invalid or incomplete inbound data in MDR
    at success (/home/alien/sites/echo/node_modules/.pnpm/twilio@5.10.7/node_modules/twilio/lib/base/Version.js:81:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async WhatsappService.sendTypingIndicator (/home/alien/sites/echo/packages/bot/src/whatsapp/whatsapp.service.ts:40:22)
    at async WhatsappController.receiveMessage (/home/alien/sites/echo/packages/bot/src/whatsapp/whatsapp.controller.ts:29:5) {
  status: 400,
  code: 400,
  moreInfo: 'https://www.twilio.com/docs/errors/400',
  details: undefined
}
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…essageId

Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix typing indicator functionality for WhatsApp Fix typing indicator API request parameter casing Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report]: Typing indicator doesn't work

2 participants