Phone passwordless connection custom provider

Hi, im trying to add a custom sms provider to our stage env on auth0. We already have a working prod env with the same provider.

So first i fetched connections from here: api/v2/connections
Took a sms connection id and updated it with options similar to what we have in prod env but with stage specific variables.

For some reason the code i get is 200 but the connection doesnt seems to update. Any one can help us out here?

Hi @mcloha,

Thanks for your question.

I have just tested the PATCH /api/v2/connections/{id} endpoint and was able to successfully update it with a 200 response and see the same data I passed in reflected in my passwordless SMS provider.

So far, I have not been able to reproduce the issue you described. However, here is a sample of the body I used:

{
  "options": {
    "from": "+12062222222",
    "name": "sms",
    "totp": {
      "length": 6,
      "time_step": 180
    },
    "syntax": "md_with_macros",
    "template": "[Test] Your verification code is here: @@password@@",
    "twilio_sid": "AC9f0...",
    "twilio_token": "7da0ca...",
    "disable_signup": false,
    "messaging_service_sid": null,
    "brute_force_protection": true
  },
  "is_domain_connection": false,
  "enabled_clients": [
    "cy9Gg..."
  ]
}

Was there something specific that you found was not updating?

Thanks,
Rueben

Hi, Rueben, thanks for the fast reply. Here is the body we are sending:

{
    "options": {
        "gateway_authentication": {
            "method": "****",
            "subject": "****",
            "audience": "****",
            "secret": "******",
            "secret_base64_encoded": false
        },
      "strategy": "***",
      "provider": "*****",
      "gateway_url": "*****",
      "from": "*****",
      "template": "*******",
      "brute_force_protection": true,
      "forward_req_info": "*******",
      "disable_signup": false,
      "name": "******",
      "syntax": "*******",
      "totp": {
        "time_step": 300,
        "length": 6
      }
    }
}

But the response we get is:

{
  "id": "******",
  "strategy": "sms",
  "name": "sms",
  "is_domain_connection": false,
  "enabled_clients": [
      "******",
      "******",
      "******",
      "******"
  ],
  "realms": [
      "sms"
  ]
}

I think that on our second env (the wokring one) we required to create a twillio integration first and then update the connection with our custom sms provider params, this time unfortunately it doenst work.

Hi @mcloha,

Thanks for the update.

I see the same results on my end, where the Get a connection endpoint returns a response schema different from the one I sent in the Update a connection endpoint.

This means that some of the details you passed to the Update a connection endpoint might not show when calling the Get a connection endpoint.

In this case, there is an alternative option to check the updated information, by going to your Auth0 Dashboard to view them.

The settings might be successfully changing with the data you sent, as seen by the 200 success code, but they just do not show the full schema of updates you made when querying for the connection.

Let me know what you find.

Thanks,
Rueben

Thanks Rueben,
When i use GET connections i do see the changes on our second tenant. On the other hand on the second tenant i can see any changes i made when i use the GET connections API.
Im afraid the changes im doing with update connections simply doesnt take any effect.

Hi @mcloha,

Thanks for the reply.

If you are able to see the changes you made on your second tenant to your passwordless SMS connection, then calling the update a connection endpoint might actually be working.

Could you clarify again whether you can update your connection and see the changes either through the Dashboard or via the Management API?

I have checked both of your tenant’s passwordless SMS connection and found that they have identical settings and values except for the gateway_url and enabled_clients. Can you confirm if you see the same information?

Thanks,
Rueben