Skip to content

Instantly share code, notes, and snippets.

@gdestuynder
Created November 1, 2019 16:23
Show Gist options
  • Save gdestuynder/1017c2147b9e12259028a975a1c39e77 to your computer and use it in GitHub Desktop.
Save gdestuynder/1017c2147b9e12259028a975a1c39e77 to your computer and use it in GitHub Desktop.
curl --request POST \
--url https://auth-dev.mozilla.auth0.com/oauth/token \
--header 'content-type: application/json' \
--data '{"client_id":"ID","client_secret":"SECRET","audience":"https://manage-dev.mozilla.auth0.com/api/session_testing","grant_type":"client_credentials", "scope": "test"}'
Result if `test` exists and is granted to your client id:
{"access_token":"SECRET","expires_in":86400,"token_type":"Bearer"}
If not:
{"error":"access_denied","error_description":"Client has not been granted scopes: test"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment