{
"error": "access_denied",
"error_description": "Client is not authorized to access \"https://dev-f0x4xlzg.us.auth0.com/api/v2/\". You need to create a \"client-grant\" associated to this API. See: https://auth0.com/docs/api/v2#!/Client_Grants/post_client_grants"
}
It sounds like the client might not be authorized - You can authorize it by going to Applications → API → Management API → Machine to Machine Applications in your tenant dashboard.
The above error got resolved, but I am still facing some issue after generating client credential , Using that token I am trying to create a new org, but it throws error
Great, good to know the original issue was resolved!
I’ve seen this error crop up when the audience is not set correctly - In this case it needs to be https://YOUR_DOMAIN.auth0.com/api/v2/
Aside from that, I’d check to make sure the correct permissions (create:organizations) are assigned to the M2M app. You can find some details on that here: