Server error while getting Management API token

I’m trying to get a token for the management api but I’m getting this (unhelpful) response:

{
    "error": "server_error",
    "error_description": "Script generated an unhandled asynchronous exception."
}

Here is the call I’m making:

curl -X POST \   https://secure.eventcore.com/oauth/token \
   -H 'Content-Type: application/json' \
   -H 'Postman-Token: 244ad2b8-0834-4466-95b3-d3c71caa45ae' \
   -H 'cache-control: no-cache' \
   -d '{
          "client_id": "kP0bCo5k8wXlxoUEMsHap8sPfMEAvsQg",
		  "client_secret": "{my secret}",
		  "audience": "https://eventcore.auth0.com/api/v2/",
		  "grant_type": "client_credentials",
		  "scopes": "read:users read:user_idp_tokens update:users update:users_app_metadata"
		}'

Please help me figure out what I’m doing wrong.

Thanks for your help!

I found the problem. It turned out to be a hook script.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.