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: ASRock Z790 PG SONIC 32GB - Intel Core i7-12700K
Graphics: - NVIDIA GeForce RTX 3050 6GB
Software: Win 11 Pro (x64) Build 26100.6584 (24H2) - NextPVR
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
System Status: Humming nicely!

Desktop: ASRock Z790 PG SONIC 32GB - Intel Core i7-12700K
Graphics: - NVIDIA GeForce RTX 3050 6GB
Software: Win 11 Pro (x64) Build 26100.6584 (24H2) - NextPVR
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2