/// <summary> /// Initializes the Twilio client. /// </summary> /// <param name="accountSid">The account SID to authenticate with Twilio as.</param> /// <param name="authToken">The account token to authenticate with Twilio with.</param> public void InitTwilioClient(Secret accountSid, Secret authToken) { TwilioClient.Init(accountSid.Value, authToken.Value); _twilioHttpClient = TwilioClient.GetRestClient().HttpClient; }
/// <summary> /// Create the instance of <see cref="TwilioProvider"/> /// </summary> /// <param name="options">The Twilio provider options</param> /// <param name="twilioHttpClient">The instance of <see cref="TwilioHttp.HttpClient"/></param> /// <param name="loggerFactory">The instance of <see cref="ILoggerFactory"/></param> public TwilioProvider(TwilioOptions options, TwilioHttp.HttpClient twilioHttpClient, ILoggerFactory loggerFactory) : base(options, loggerFactory) { _twilioRestClient = new TwilioRestClient(options.AccountSid, options.AuthToken, httpClient: twilioHttpClient); _options = options; }