I’m getting a weird error when trying to do anything via the management API via the Node SDK. Specifically:
FetchError: The request failed and the interceptors did not return an alternative response
Here’s my code.
const auth0 = new ManagementClient({
domain: '*****.uk.auth0.com',
clientId: '*****',
clientSecret: '*****',
});
await auth0.users.update(
{id: 'auth0|*****'},
{app_metadata: {foo: 'bar'}}
);
I’ve read every topic on this error and nothing has helped. Specifically:
- I’m not using
dd-trace
, a package that some said caused the problem - I’m not prefixing my domain with a protocol
- My credentials are correct
One thing I would like to confirm is where I should get my client ID and secret from. I’m currently getting them from Applications > API Explorer Application. I assume I don’t need to do anything else with this built-in application in order to be able to use the management API. Under “APIs” the management API is listed, and it is authorised.
I am hosted on Cloudflare Workers.
Have I no option but to use the REST API rather than the Node SDK?