Unable to add a user programmatically

Hello all.

I am having a issue when a tried to add a user to the database using the api, I am getting a bad audience error. I did add to the management keys the correct scopes, the one that I found on the documentation was create:users. But I am still getting the same error.

I am been searching on the web for assistance on this but I am shooting in the dark. Any help will highly appretiated.

Thanks

Hi @ihang,

Bad audience refers to the audience param in your token. Does the token have the correct audience? It should be the URI of your management API (i.e. https://YOUR-TENANT.auth0.com/api/v2/).

If this doesn’t help, could you please provide an example request you are making?

Thanks,
Dan