Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. $user = "api_user"
  2. $pass = "api_pass"
  3. $secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
  4. $credential = New-Object System.Management.Automation.PSCredential($user, $secpasswd)
  5.  
  6. Invoke-RestMethod -Uri 'http://api/sms' -Method Post -Credential $credential -Body '{from: "Sender", to: "My_Number", body: "my text", messageType: "Normal", requireDeliveryNotification: false, validFor: 60, charset: "Default" }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement