How to create sms connection user through Management API

I’m trying to create a sms user through management api with body

{
  "phone_number": "XXXXXXXXXX",
  "user_metadata": {},
  "phone_verified": false,
  "app_metadata": {
    "member_number" : "XXXXXX"
  },
  "given_name": "XXX",
  "family_name": "XXXX",
  "connection": "sms"
}

but it fails with below error

{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Connection must be enabled for this client to perform single user creation and signup operations (client_id: XXXXX - connection: sms)",
    "errorCode": "auth0_idp_error"
}

I’m using a M2M application to make this request and for this type of application, I could not find any place were enable sms connection.

Hi @Jojo.Jose , welcome to the Auth0 Community!

For M2M apps we can not do it under the app’s “Connections” tab, but you should be able to enable the sms connection to your M2M app by going to your Auth0 dashboard → Authentication → Passwordless → SMS → Applications → And from the shown list choose your M2M app.

Please let us know if that worked for you!

1 Like

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