2017-09-13, 02:27 PM
Hello. I'm trying to access the SD token needed for schedules access using Windows Powershell.
If anyone has any experience or wisdom on how to do this, I would appreciate the help.
This is what I've tried so far but with no success:
$sdUID = 'abcdef'
$sdPW = Get-StringHash -String "123456" -HashName "SHA1"
$sdPW = $sdPW.ToLower()
$jhsdLogin = @{"username"= $sdUID; "password"= $sdPW} | ConvertTo-Json
$sdUAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer
$sdContentType = "application/json;charset=UTF-8"
$sdToken = Invoke-WebRequest -Uri https://json.schedulesdirect.org/20141201/token -UseBasicParsing -Method Post -Body $jhsdLogin -UserAgent $sdUAgent -ContentType $sdContentType -Debug
This snippet results in "400 Bad Input."
I've also posted on the SchedulesDirect Developer forum.
Thank you.
If anyone has any experience or wisdom on how to do this, I would appreciate the help.
This is what I've tried so far but with no success:
$sdUID = 'abcdef'
$sdPW = Get-StringHash -String "123456" -HashName "SHA1"
$sdPW = $sdPW.ToLower()
$jhsdLogin = @{"username"= $sdUID; "password"= $sdPW} | ConvertTo-Json
$sdUAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer
$sdContentType = "application/json;charset=UTF-8"
$sdToken = Invoke-WebRequest -Uri https://json.schedulesdirect.org/20141201/token -UseBasicParsing -Method Post -Body $jhsdLogin -UserAgent $sdUAgent -ContentType $sdContentType -Debug
This snippet results in "400 Bad Input."
I've also posted on the SchedulesDirect Developer forum.
Thank you.
Later...JohnC
System Status: Humming nicely!
Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - NVIDIA GeForce GTX 1050 Ti Graphics
Software: Win 10 Pro(Build 1909) - NextPVR - WinTV8
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
RaspberryPi 4 Raspbian and FLIRC
System Status: Humming nicely!
Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - NVIDIA GeForce GTX 1050 Ti Graphics
Software: Win 10 Pro(Build 1909) - NextPVR - WinTV8
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
RaspberryPi 4 Raspbian and FLIRC