【问题标题】:how to send excel file by using twilio in C#如何在 C# 中使用 twilio 发送 excel 文件
【发布时间】:2021-04-26 08:07:58
【问题描述】:

下面是我发送 Excel 文件的代码

       TwilioClient.Init(AccountSid, AuthToken);
       
       
        var mediaUrl = new List<Uri>();
        if (!string.IsNullOrEmpty(UriString))
        {
            mediaUrl = new[] {
                new Uri(UriString), //here I am passing url of Excel
            }.ToList();
        }

        var message1 = MessageResource.Create(               
           to: new PhoneNumber("whatsapp:" + ToNumber), from: new PhoneNumber("whatsapp:" + FromNumber),              
           body: message,
           mediaUrl: mediaUrl
         );

但是,我遇到了错误,

(错误:11200)HTTP 检索失败尝试检索此 URL 的内容时失败。

我该怎么办?

提前致谢。

【问题讨论】:

    标签: twilio twilio-api twilio-twiml twilio-programmable-chat twilio-click-to-call


    【解决方案1】:

    这里是supported WhatsApp MIME 类型(列表中没有application/vnd.ms-excel)。

    【讨论】:

    • 是的..知道了..Twilio 不支持 Excel 的 MIME 类型。
    【解决方案2】:

    Twilio 不支持 Excel 的 MIME 类型 application/vnd.ms-excel

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-25
      • 2019-10-28
      • 2022-06-16
      • 2020-07-07
      • 1970-01-01
      • 1970-01-01
      • 2017-09-03
      • 1970-01-01
      相关资源
      最近更新 更多