Skip to content

Instantly share code, notes, and snippets.

@Tanver-Hasan
Created January 7, 2019 15:50
Show Gist options
  • Save Tanver-Hasan/b9b97e892d57b2126fb97dc6dc157ce0 to your computer and use it in GitHub Desktop.
Save Tanver-Hasan/b9b97e892d57b2126fb97dc6dc157ce0 to your computer and use it in GitHub Desktop.
#Get token
curl --request POST \
--url 'https://[domain].auth0.com/oauth/token' \
-H 'content-type: application/json' \
-d '{"grant_type":"client_credentials","client_id": "[Client ID]","client_secret": "[Client Secret]","audience": "https://[domain].auth0.com/api/v2/"}'
#Retrieves all Guardian enrollments.
curl --request GET \
--url "https://[domain].auth0.com/api/v2/users/[User ID]/enrollments" \
-H "content-type:application/json" \
-H "Authorization:Bearer [Token]"
# Deletes an enrollment
curl --request DELETE \
--url "https://[domain].auth0.com/api/v2/guardian/enrollments/[Enrolement ID]" \
-H "content-type: application/json" \
-H "Authorization:Bearer [Token]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment