Hi
I want to use manage API to delete user with the endpoint
DELETE /api/v2/users/{id}
I already have machine-to-machine app with all APIs Authorized
and delete:users checked in permissions
So I follow this doc to get access token :
but the API returns me HTTP 500 with this body :
{
"error": "server_error",
"error_description": "Script generated an unhandled asynchronous exception."
}
I try with Insomnia and my project and i’ve got the same result
My code :
RestBuilder rest = new RestBuilder()
RestResponse response = rest.post("https://tenant-url/oauth/token") {
contentType("application/json")
json({
grant_type = "client_credentials"
client_id = "my client id"
client_secret = "my client secret"
audience = "https://tenant-url/api/v2/"
})
}
I see nothing wrong on status page so why I’ve got a 500 error ?