简体   繁体   English

Nexmo SMS API发送不带正文的文本

[英]Nexmo SMS api sending text with out body text

I have a calledback method registered at Nexmo. 我在Nexmo注册了一个回调方法。

And I am having my action method hit by Nexmo when message is received. 收到消息后,我的Nexmo遇到了操作方法。

But I am not getting message text and timestamp. 但是我没有收到消息文本和时间戳。

I am getting only messageId , Sender and receiver number in response 我只得到messageId ,发件人和收件人号码作为响应

following is my code 以下是我的代码

      SMS.SMSRequest r = new SMS.SMSRequest();           
        r.to = "number";

        r.from = Configuration.Instance.Settings["a"];
        r.body = "Testing";
        r.text = "Testing";          

        Nexmo.Api.Request.Credentials c = new Nexmo.Api.Request.Credentials();
        c.ApiKey = "Key";
        c.ApiSecret = "key";
        c.ApplicationId = "ID";
        c.ApplicationKey = "XYZ";
       // r.message_class = "1";
        r.type = "text"; 


        r.callback = "http://www.eurosoftsms.co.uk/inbound/SMSInbound"; 
           var x=  Nexmo.Api.SMS.Send(r,c);

The result of r.Send(..) with status 0 means Its OK 状态为0r.Send(..)的结果表示其OK

Any help will be appreciated, Thanks 任何帮助将不胜感激,谢谢

According to Nexmo's documentation , you shouldn't expect to get message text as part of the delivery receipt. 根据Nexmo的文档 ,您不应期望将消息文本作为交货收据的一部分。 The receipt does contain a timestamp, but note that the field's name is "message-timestamp". 收据确实包含时间戳,但是请注意,该字段的名称为“ message-timestamp”。 The problem is probably in your code that handles the callback, not the code that you posted which sends a message. 问题可能出在您处理回调的代码中,而不是您发布的发送消息的代码中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM