Created
April 3, 2019 00:34
Star
You must be signed in to star a gist
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
$to = "+61412345678" | |
$validity = "60" | |
$message = "On average, cats spend 2/3 of every day sleeping. That means a nine-year-old cat has been awake for only three years of its life" | |
$body = @{"to"=$to;"validity"=$validity;"body"="$message"} | |
$body = $body | ConvertTo-JSON -depth 99 | |
$uri = "https://tapi.telstra.com/v2/messages/sms" | |
Invoke-RestMethod -Uri $uri -ContentType "application/json" -Headers @{"Authorization"="Bearer $access_token"} -Method POST -Body $Body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment