The type or namespace name 'TwilioCapability' could not be found

时间:2016-08-31 18:32:08

标签: twilio twilio-api

I am trying to write my first Twilio app. I am following the QuickStart guides but I cannot even build the code in the sample page because it cannot see the TwilioCapability type.

@using Twilio;
@{
    string accountSid = "asdfasdfasdf";
    string authToken = "asdfasdfasdfa";

    var capability = TwilioCapability(accountSid, authToken);

    capability.AllowClientOutgoing("APabe7650f654fc34655fc81ae71caa3ff");
    var token = capability.CreateToken();
}

I am using Visual Studio 2013, I have tried various versions of MVC and .Net Framework in case there is a version issue, but it always happens. I can't think of anything else to try...

Hoping someone else has seen this before!

1 个答案:

答案 0 :(得分:3)

似乎尝试使用Nuget package - Twilio客户端功能令牌生成器与Twilio Client for browsers JavaScript SDK一起使用就可以实现上述技巧。

OP Notes特别使用:

Install-Package Twilio.Client -Version 3.5.1