TWILIO를 사용하여 C# 콘솔 앱에서 SMS를 보내는 데 문제가 있습니다. 처음에는 "메소드를 찾을 수 없다는 오류가 발생했습니다 : 'Void RestSharp.RestClient.set_BaseUrl (System.String)'." 다른 게시물에 주어진 솔루션을 적용한 후 응용 프로그램이 실행됩니다. 그러나 그것은 어떤 sms을 보내지 않는다. 다른 게시물의 응답을보고 난 후에 RestException 속성을 사용하여 시도한 결과 "다음 번호로 표시된 지역에 SMS를 보낼 수있는 권한이 설정되지 않았습니다 : + 880161xxxxxxx."라는 예외 메시지로 다음 메시지를 발견했습니다. " Twilio 기반 응용 프로그램이 방글라데시 (+880 국가 코드)에서 작동하지 않는다는 의미입니까? 업데이트 계획이 있습니까? Twilio 웹 사이트에서 확인 SMS를 보내서 번호 (+ 880161xxxxxxx)의 유효성을 검사 할 수있는 Twilio 웹 사이트에서 언급을 추가하고 싶습니다. TWILIO 님이 C# 콘솔 앱에서 SMS를 보낼 수 없습니다.
는 다음 코드using Twilio;
namespace SMSTestApp1
{
class Program
{
static void Main(string[] args)
{
// Find your Account Sid and Auth Token at twilio.com/user/account
string AccountSid = "xxx";
string AuthToken = "yyy";
var twilio = new TwilioRestClient(AccountSid, AuthToken);
var message = twilio.SendMessage("+1205490xxxx", "+8801615xxxxxx", "Test Message", new string[] { }, String.Empty);
Console.WriteLine(message.Sid);
if (message.RestException != null)
{
Console.WriteLine(message.RestException.Message);
}
Console.WriteLine("Finish");
Console.ReadKey();
}
}
}