Create user via HTTP Request

I am trying to synchronize my web API with my Auth0 API’s Application.
Basically when i create a user using my API i want to create that same user on Auth0’s Application.

Firstly, i try to obtain the API Management Token i get access to that successfully (with the scope “create:users”) and then when i try to add a new user via HTTP Request i get this body:

{
“statusCode”: 401,
“error”: “Unauthorized”,
“message”: “Bad audience: [my_applications_identifier]”
}

The body has email and password of new user and the URL seems about right as well.
Someone has any clue what am i doing wrong?

Hi @psimoes

Welcome to the Auth0 Community!

Thank you for posting your question. The error you see is probably connected to the bad audience during the call to the management API. We have an excellent Knowledge Solution about that issue → Audience is invalid error

Thanks
Dawid

1 Like

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