Results 1 to 6 of 6

Thread: SchedulesDirect using Powershell

  1. #1
    Join Date
    Jun 2015
    Location
    Dutchess County, NY USA
    Posts
    198

    SchedulesDirect using Powershell

    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.
    Later...JohnC

    System Status: Humming
    Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - AMD HD6670 Video
    Software: Win 10 Pro(Creators) - NextPVR - WinTV8 - Total Media Extreme - VLC
    Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge HDPVR

  2. #2
    Join Date
    May 2006
    Location
    Canada
    Posts
    25,647
    I can't help with the code but a while back XP users had troubles and it was noted that SD load balancers started to reject TLS 1.0 and I am not sure that you should be using the SHA1 hash

    If you don't require security for your password change to http:// will be simpler.

    Martin

  3. #3
    Join Date
    Jun 2015
    Location
    Dutchess County, NY USA
    Posts
    198
    Thanks, Martin. I've taken up this issue with SD and Mr. K has generously agreed to help find out what I'm doing wrong. All the SD documentation shows that the password should be SHA1 encrypted. Maybe the documents are wrong and I hope that Mr K will see that.
    Later...JohnC

    System Status: Humming
    Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - AMD HD6670 Video
    Software: Win 10 Pro(Creators) - NextPVR - WinTV8 - Total Media Extreme - VLC
    Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge HDPVR

  4. #4
    Join Date
    Jun 2015
    Location
    Dutchess County, NY USA
    Posts
    198
    My helper from SchedulesDirect seems to be rather busy of late which I can understand. So...

    sub, would you be kind enough to post the code snippet you use to request a token from SD? Any language.

    Thanks.
    Later...JohnC

    System Status: Humming
    Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - AMD HD6670 Video
    Software: Win 10 Pro(Creators) - NextPVR - WinTV8 - Total Media Extreme - VLC
    Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge HDPVR

  5. #5
    Join Date
    May 2006
    Location
    Canada
    Posts
    25,647
    The reference Java source is available at https://github.com/SchedulesDirect/mfdb-json

    Martin

  6. #6
    Join Date
    Jun 2015
    Location
    Dutchess County, NY USA
    Posts
    198
    Thanks to all who responded.

    I have finally hacked the code to retrieve a token. All data in SchedulesDirect is now available for retrieval and examination. Now I *really* gotta learn Powershell a LOT better! But it's lookin' good!
    Later...JohnC

    System Status: Humming
    Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - AMD HD6670 Video
    Software: Win 10 Pro(Creators) - NextPVR - WinTV8 - Total Media Extreme - VLC
    Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge HDPVR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •