Skip to content

Instantly share code, notes, and snippets.

@maltoe
Created May 4, 2022 10:06
Show Gist options
  • Save maltoe/29fdcc88b1180226b0c8de7d285d6d8f to your computer and use it in GitHub Desktop.
Save maltoe/29fdcc88b1180226b0c8de7d285d6d8f to your computer and use it in GitHub Desktop.
username="a25...<redacted>"
password="Brz...<redacted>"
base_url="https://box-i...<redacted>"
basic=$(echo -n "$username:$password" | base64 -w0)
curl -X POST \
-v \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H "Authorization: Basic $basic" \
-d '{"grant_type": "client_credentials"}' \
"$base_url/api/broker/v1/auth/token"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment