> ## Documentation Index
> Fetch the complete documentation index at: https://docs.authsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Server SDKs - Authenticators

> Use Authsignal's server-side SDK methods for authenticators.

## Get Authenticators

<Card title="API schema" icon="file-code" href="/api-reference/server-api/get-authenticators" horizontal />

This method lets you retrieve a list of the authenticators that a user currently has enrolled.

<CodeGroup>
  ```ts Node.js theme={null}
  const request = {
    userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
  };

  const authenticators = await authsignal.getAuthenticators(request);
  ```

  ```csharp C# theme={null}
  var request = new GetAuthenticatorsRequest(
      UserId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833"
  );

  UserAuthenticator[] authenticators = await authsignal.GetAuthenticators(request);
  ```

  ```java Java theme={null}
  GetAuthenticatorsRequest request = new GetAuthenticatorsRequest();
  request.userId = "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833";

  UserAuthenticator[] authenticators = authsignal.getAuthenticators(request).get();
  ```

  ```ruby Ruby theme={null}
  response = Authsignal.get_authenticators(user_id: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833")
  ```

  ```python Python theme={null}
  authenticators = authsignal.get_authenticators(
      user_id="dc58c6dc-a1fd-4a4f-8e2f-846636dd4833"
  )
  ```

  ```PHP PHP theme={null}
  $authenticators = Authsignal::getAuthenticators([
      'userId' => "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833"
  ]);
  ```

  ```go Go theme={null}
  authenticators, err := client.GetAuthenticators(
      GetAuthenticatorsRequest{
          UserId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
      },
  )

  ```
</CodeGroup>

## Enroll Verified Authenticator

<Card title="API schema" icon="file-code" href="/api-reference/server-api/enroll-verified-authenticator" horizontal />

This method lets you enroll an email or SMS-based authenticator for a user whose email address or phone number has already been verified via an external platform.

<CodeGroup>
  ```ts Node.js theme={null}
  const request = {
    userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
    attributes: {
      verificationMethod: VerificationMethod.SMS,
      phoneNumber: "+64270000000",
    },
  };

  const response = authsignal.enrollVerifiedAuthenticator(request);
  ```

  ```csharp C# theme={null}
  var request = new EnrollVerifiedAuthenticatorRequest(
      UserId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
      Attributes: new EnrollVerifiedAuthenticatorAttributes(
          VerificationMethod: VerificationMethod.SMS,
          PhoneNumber: "+64270000000"
      )
  );

  var response = await authsignal.EnrollVerifiedAuthenticator(request);
  ```

  ```java Java theme={null}
  EnrollVerifiedAuthenticatorRequest request = new EnrollVerifiedAuthenticatorRequest();
  request.userId = "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833";
  request.attributes = new EnrollVerifiedAuthenticatorAttributes();
  request.attributes.verificationMethod = VerificationMethodType.SMS;
  request.attributes.phoneNumber = "+64270000000";

  authsignal.enrollVerifiedAuthenticator(request).get();
  ```

  ```ruby Ruby theme={null}
  Authsignal.enroll_verified_authenticator(
      user_id: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
      attributes:{
          verification_method: "SMS",
          phone_number: "+64270000000"
      }
  )
  ```

  ```python Python theme={null}
  response = authsignal.enroll_verified_authenticator(
      user_id="dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
      attributes={
          "verificationMethod": "SMS",
          "phoneNumber": "+64270000000"
      }
  )
  ```

  ```php PHP theme={null}
  $response = Authsignal::enrollVerifiedAuthenticator([
      'userId' => "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
      'attributes' => [
          "verificationMethod" => "SMS",
          "phoneNumber" => "+64270000000"
      ]
  ]);
  ```

  ```go Go theme={null}
  response, err := client.EnrollVerifiedAuthenticator(
      EnrollVerifiedAuthenticatorRequest{
          UserId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
          Attributes: &EnrollVerifiedAuthenticatorAttributes{
              VerificationMethod: "SMS",
              PhoneNumber: "+64270000000",
          },
      },
  )

  ```
</CodeGroup>

<Warning>
  This method should not be used if you haven't yet verified the user's email or phone number. It
  does not send out an email / SMS to initiate a verification process - if you need to verify an
  email address or phone number, you should use the [Web SDK](/sdks/client/web/setup), [Mobile
  SDK](/sdks/client/mobile/setup), or the [pre-built
  UI](/implementation-options/prebuilt-ui/overview).
</Warning>

## Delete Authenticator

<Card title="API schema" icon="file-code" href="/api-reference/server-api/delete-authenticator" horizontal />

This method lets you remove an authenticator that a user has previously enrolled.

<CodeGroup>
  ```ts Node.js theme={null}
  const request = {
    userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
    userAuthenticatorId: "bf287470-24d9-4aa4-8b29-85683bea703f",
  };

  await authsignal.deleteAuthenticator(request);
  ```

  ```csharp C# theme={null}
  var request = new DeleteAuthenticatorRequest(
      UserId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
      UserAuthenticatorId: "bf287470-24d9-4aa4-8b29-85683bea703f"
  );

  await authsignal.DeleteAuthenticator(request);
  ```

  ```java Java theme={null}
  DeleteAuthenticatorRequest request = new DeleteAuthenticatorRequest();
  request.userId = "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833";
  request.userAuthenticatorId = "bf287470-24d9-4aa4-8b29-85683bea703f";

  authsignal.deleteAuthenticator(request).get();
  ```

  ```ruby Ruby theme={null}
  Authsignal.delete_authenticator(
      user_id: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
      user_authenticator_id: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833"
  )
  ```

  ```python Python theme={null}
  authsignal.delete_authenticator(
      user_id="dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
      user_authenticator_id="bf287470-24d9-4aa4-8b29-85683bea703f"
  )
  ```

  ```php PHP theme={null}
  Authsignal::deleteAuthenticator([
      'userId' => "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
      'userAuthenticatorId' => "bf287470-24d9-4aa4-8b29-85683bea703f"
  ]);
  ```

  ```go Go theme={null}
  err := client.DeleteAuthenticator(
      DeleteAuthenticatorRequest{
          UserId:              "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
          UserAuthenticatorId: "bf287470-24d9-4aa4-8b29-85683bea703f",
      },
  )

  ```
</CodeGroup>
