Created
May 13, 2017 11:24
-
-
Save mplacona/3669d5255f986010977155c5eb9ea3c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.twilio.http.TwilioRestClient | |
import com.twilio.rest.api.v2010.account.MessageCreator | |
import com.twilio.type.PhoneNumber | |
// ... | |
@RequestMapping(value = "/sendMessage") | |
fun sendMessage(){ | |
val client = TwilioRestClient.Builder("YOUR_TWILIO_ACCOUNT_SID", "YOUR_TWILIO_AUTH_TOKEN").build() | |
val message = MessageCreator( | |
PhoneNumber("YOUR_PHONE_NUMBER"), | |
PhoneNumber("YOUR_TWILIO_NUMBER"), | |
"Look ma I'm type inferred!").create(client) | |
println(message.getSid()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment