Skip to content

Instantly share code, notes, and snippets.

@rtrouton
Created January 5, 2022 14:54
Show Gist options
  • Save rtrouton/4b5ea48b38b1f0c58e60348517332d38 to your computer and use it in GitHub Desktop.
Save rtrouton/4b5ea48b38b1f0c58e60348517332d38 to your computer and use it in GitHub Desktop.
Obtain a Bearer Token from the Jamf Pro API using Basic Authentication on macOS Big Sur and earlier
curl -X POST -u username:password -s https://server.name.here/api/v1/auth/token | python -c 'import sys, json; print json.load(sys.stdin)["token"]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment