Skip to content

Instantly share code, notes, and snippets.

@jdmills-edu
Created September 21, 2017 14:24
Show Gist options
  • Save jdmills-edu/c309855370a9fdf34ac2ea99d3876e0c to your computer and use it in GitHub Desktop.
Save jdmills-edu/c309855370a9fdf34ac2ea99d3876e0c to your computer and use it in GitHub Desktop.

Revisions

  1. jdmills-edu created this gist Sep 21, 2017.
    12 changes: 12 additions & 0 deletions TeamDynamixAPI-Authenticate.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    $url = "https://yourdomain.teamdynamix.com/TDWebApi/api"
    $action = "/auth/loginadmin"
    $endpoint = $url+$action

    $request = '{
    "BEID": "YourTDXAPIBEID",
    "WebServicesKey": "YourWebServicesKey"
    }'

    $jwt = Invoke-RestMethod -Method Post -Uri $endpoint -Body $request -ContentType "application/json; charset=utf-8"

    return $jwt