auth0 / node-auth0

Node.js client library for the Auth0 platform.
MIT License
641 stars 309 forks source link

Error trying to use api.createUser(userData, callback) for connection:sms (passwordless) #32

Closed oskosk closed 6 years ago

oskosk commented 9 years ago

Using node-auth 0.8.2

I may be using this method incorrectly but tried to follow the parameters mentioned in Passwordless Connections for the /users POST endpoint and I keep getting passed an error object with this message to my callback :

 ApiError: User must have one of the following identifier fields: user_id | _id | id

More details:

The call to api.createUser is being made like this:

    // api = new Auth0({.....})
    api.createUser({
      connection: "sms",
      email_verified: false,
      phone_number: "+541155555555"
    }, function(err, user) {
      if (err) {
        var errorstring = util.format("Error creating user : %s", err.toString());
        return res.status(500).json({
          message: errorstring
        });
      }
      res.json(user);
    });
luisrudge commented 6 years ago

Hi! I'm sorry about the copy/paste message, but I'm cleaning up some stale/old issues. 🗑 It's been a while since this issue was opened. Are you still having this issue with the latest version? If so, please reopen it with some repro steps so we can help!