一個question on dialing out with Twilio引起我的注意,特別是:我如何獲得Twilio SID?
capability.allowClientOutgoing("APf5250942ec073c9d08848990cbc0ff5e");
看着sample code:
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Application;
public class Example {
// Find your Account Sid and Token at twilio.com/user/account
public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
public static final String AUTH_TOKEN = "your_auth_token";
public static void main(String[] args) throws TwilioRestException {
TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);
// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
Application app = client.getAccount().getApplication("AP2a0747eba6abf96b7e3c3ff0b4530f6e");
System.out.println(app.getSmsUrl());
}
}
這不是更清晰。 ACCOUNT_SID
和AUTH_TOKEN
很容易複製/粘貼。我在哪裏以及如何獲取要發送的字符串?
Javadocs說:
getApplication
public Application getApplication(String sid)
Get a given application instance by sid
Parameters:
sid - The 34 character sid starting with AP
剛剛把我帶回到哪裏,以及如何獲取SID發起呼叫。