Trying to use the AddExtraParams method when sending an SMS to attach metadata to the call. I'm getting
"Invalid JSON The supplied JSON is invalid. at Telnyx.Infrastructure.Requestor.ExecuteRequest(HttpRequestMessage requestMessage)"
Code:
var request = new RequestOptions();
request.ApiKey = APIKey;
var sendOptions = new NewMessagingSenderId {
To = CleanPhoneNumber(message.PhoneNumberTo),
MessagingProfileId = new Guid(MessageProfileId),
Text = message.Text
};
sendOptions.AddExtraParam("refID", "123");
var messageService = new MessagingSenderIdService();
var response = messageService.Create(sendOptions, request);
Trying to use the AddExtraParams method when sending an SMS to attach metadata to the call. I'm getting
"Invalid JSON The supplied JSON is invalid. at Telnyx.Infrastructure.Requestor.ExecuteRequest(HttpRequestMessage requestMessage)"
Code:
var request = new RequestOptions(); request.ApiKey = APIKey;
var sendOptions = new NewMessagingSenderId { To = CleanPhoneNumber(message.PhoneNumberTo), MessagingProfileId = new Guid(MessageProfileId), Text = message.Text };
sendOptions.AddExtraParam("refID", "123");
var messageService = new MessagingSenderIdService(); var response = messageService.Create(sendOptions, request);