Skip to content

Instantly share code, notes, and snippets.

@darrenjrobinson
Created September 4, 2017 05:38
Show Gist options
  • Save darrenjrobinson/71ef9509f7abcea70e84e44505e3c58c to your computer and use it in GitHub Desktop.
Save darrenjrobinson/71ef9509f7abcea70e84e44505e3c58c to your computer and use it in GitHub Desktop.
Send a Test Message to confirm configuration
# My Push Bullet Access Token
# Created via Profile Page https://www.pushbullet.com/#settings/account
$accessToken = 'o.oy3Un8Zb56FjJa8cQVNQ1234567890'
# Push Bullet API URI
$apiURI = "https://api.pushbullet.com/"
# Web Request Header
$header = @{"Access-Token" = $accessToken
'Content-Type' = "application/json"
}
$content = @{
"type" = "note"
"title" = "MIM Azure Function Error"
"body" = "Test Message"
}
$body = $content | ConvertTo-Json
# Test POST
$notification = Invoke-RestMethod -Method Post -Headers $header -Uri ($apiURI +"v2/pushes") -Body $body
$notification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment