question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding Custom Headers Property

See original GitHub issue

Note: These issues are for bugs and feature requests for the helper libraries. If you need help or support, please email help@twilio.com and one of our experts will assist you!

3.32.0

Feature Request

The ability to add headers to an API request with the product helper utilities would provide support for those that need custom headers like X-Twilio-Webhooks-Enabled.


// example of the feature request

const client = twilio('SKxxxx', 'xxxx', {
  accountSid: 'ACxxxx'
});

await client.chat
  .services(serviceSid)
  .channels(channelSid)
  .messages.create({
    body: `This was created by the API. It's ${moment().format('HH:mm:ss')}`,
    from: author,
    headers: {
      "X-Twilio-Example": "Foo" 
      "X-Twilio-Header": "Awesome Value",
      "X-Twilio-Webhooks-Enabled": "true"
   }
});

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
CatalinVosscommented, May 18, 2020

For confused souls of the future, the field is called xTwilioWebhookEnabled:

twilioClient.chat
  .services(your TWILIO_CHAT_SERVICE_SID)
  .channels(your channel)
  .messages.create({
    from: author,
    body,
    ...
    xTwilioWebhookEnabled: true,
  });
1reaction
eshanholtzcommented, Nov 14, 2019

The fix for this issue will be included in the next release on 12/4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Custom Headers <add> | Microsoft Learn
How to set custom HTTP headers for a Web site or application · Open Internet Information Services (IIS) Manager: · In the Connections...
Read more >
How to Add Custom Headers in ASP.NET Core Web API
In this article, we are going to learn how to add custom headers in ASP.NET Core Web API and how to enable it...
Read more >
Custom HTTP Headers - KeyCDN Support
Custom HTTP headers are extremely useful for providing additional information. Learn more about using, naming, and implementing them.
Read more >
HTTP headers - MDN Web Docs - Mozilla
An HTTP header consists of its case-insensitive name followed by a colon ( : ), then by its value. Whitespace before the value...
Read more >
Create custom headers in backend services | Load Balancing
Working with custom request headers · Go to the load balancing summary page. · Click Backends. · Click the name of a backend...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found