Guest User

Untitled

a guest
Apr 27th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #!/bin/bash
  2. CLIENT_ID= # Add client id
  3. CLIENT_SECRET= # Add client secret
  4. AUTH_TOKEN_URL= # Add token url
  5. AUDIENCE= # Add audience
  6. curl --silent --request POST \
  7. --url $AUTH_TOKEN_URL \
  8. --header 'content-type: application/json' \
  9. --data "{\"client_id\":\"$CLIENT_ID\",\"client_secret\":\"$CLIENT_SECRET\",\"audience\":\"$AUDIENCE\",\"grant_type\":\"client_credentials\"}" 2>&1 | \
  10. grep -Eoi 'ey([^"]+)' | \
  11. pbcopy; \
  12. echo "Copied to clipboard"
Add Comment
Please, Sign In to add comment