JAMF Pro is deprecating basic authentication in their classic API. This is how I authenticate to the API using bearer token authentication with PowerShell.
How I used PowerShell to check if $Today was a school day before continuing on with script tasks.