Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hello! You will have to be decently self-sufficient and at least able to figure out what to do should an error happen or I don't explain something totally.
- Have the latest version of Eclipse installed.
- Instructions:
- 1. Figure out how to add a Maven dependency.
- 2. Add this to the list of dependencies:
- <dependency>
- <groupId>com.twilio.sdk</groupId>
- <artifactId>twilio</artifactId>
- <version>(7.11.0,7.12.0]</version>
- </dependency>
- 3. Add Maven Clean plugin to the build path as a referenced library
- 4. Right click on the project, Run As -> Maven Build...
- 5. In goals, write "clean verify"
- 6. Click run
- 7. Once it has finished downloading, create a class in src/main/java and paste the following code where appropriate:
- public static final String ACCOUNT_SID = "<account sid here>";
- public static final String AUTH_TOKEN = "<auth token here>";
- public static void main(String[] args) throws URISyntaxException {
- Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
- Call call = Call.creator(new PhoneNumber("<number 1, including +1>"), new PhoneNumber("<number 2, including +1>"),
- new URI("http://demo.twilio.com/docs/voice.xml")).create();
- System.out.println("Call successful");
- }
- 8. Create a Twilio account
- 9. Find your auth token and account sid at: twilio.com/user/account and put them where appropriate
- 10. Add two numbers to https://www.twilio.com/console/phone-numbers/verified by clicking the red plus button and entering necessary information
- 11. Put the two numbers in the code where appropriate
- 12. Run the program!
- 13. Add automation to taste.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement