Auth0 Home Blog Docs

Management API v2 - account linking


#1

I am trying to do a post to the api that links user accounts - using Postman or curl I can verify that my invocation works. However in code it seems to return 404. Am I missing something obvious here ?
var linkBody = {“provider”:“google-oauth2”,“user_id”:“google-oauth2|XXXXXXXXXX”};
var options = {
method: ‘POST’,
url: ‘https://XXXX.auth0.com/api/v2/users/auth0|XXXXXXXXX/identitites’,
headers: {‘authorization’: process.env.ACCESS_TOKEN_MGMT, ‘Content-Type’: ‘application/json’},
body: JSON.stringify(linkBody)
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
var allusers = JSON.parse(body);
});