Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- import Alamofire
- if let accountSID = ProcessInfo.processInfo.environment["TWILIO_ACCOUNT_SID"],
- let authToken = ProcessInfo.processInfo.environment["TWILIO_AUTH_TOKEN"] {
- let url = "https://api.twilio.com/2010-04-01/Accounts/(accountSID)/Calls"
- let parameters = ["From": "YOUR_TWILIO_NUMBER", "To": "YOUR_PERSONAL_NUMBER", "Url": "YOUR_TWIML_URL"]
- Alamofire.request(url, method: .post, parameters: parameters)
- .authenticate(user: accountSID, password: authToken)
- .responseJSON { response in
- debugPrint(response)
- }
- RunLoop.main.run()
- }
Add Comment
Please, Sign In to add comment