I amhaving considerable issues getting a seemingly basic operation to work. I don’t know why this is made so difficult, or why the docs are so disparate but here we are…
I have an endpoint that creates basic users on registration, so that when we launch they don’t have to sign up or anything like that. I am getting the access token from the management API after having created another machine-to-machine application. I am then passing that token into another request object to create the user.
I am getting 401 from the axios request and “invalid URI” from the request request.
Have considered using our auth0 node library? The management client makes it dead simple. I would recommend it if you are having trouble making your own requests against the management API.
I am curious, why are using using both axios and request ?
I had thought of using that but tbh the docs are not very clear about what the difference is between the two methods and how to use Auth0 in this way. Now I see this is obviously the better and preferred option.
There seem to be two copies of the docs with one neatly organized in the link you have provided and the other smattered across tutorials and the getting started section on the website inside the accounts section. I suspect the link you provided is the new and improved documentation and I must say it is very nice indeed.
I’ve used request and axios because that is how the instructions are laid out in the application window on my Auth0 account, I too found that odd. See my previous comment about fractured documentation. I tried to use one or the other but had issues when not strictly following the documentation.
Anyway, all of that aside it turns out that what I really need was to simply change the login type to password-less and eliminate the need for any of the above. Again, something that ought to be front of mind in the docs as passwords are outmoded.
Thanks for the thorough feedback. We really appreciate it. I’ll take a look at this and pass along the relevant info to the teams who manage these code snippets. I agree, it’s odd that one uses request and one uses axios.