# Manage registration whitelist

Configure a registration whitelist for your user pool, which is similar to the invitation registration rule. After opening, only users in the whitelist can register. Authing currently supports whitelisting methods such as mobile phone number, email address, and user name.

# Get whitelist records

WhitelistManagementClient().list(type)

Get whitelist record

# Parameters

  • type <WhitelistType> Whitelist type, USERNAME is user name, Email is mailbox, Phone is mobile phone number.

# Example

var list = await managementClient.Whitelist.List(WhitelistType.USERNAME);

# Add whitelist

WhitelistManagementClient().add(type, list)

Add whitelist

# Parameters

  • type <WhitelistType> Whitelist type, USERNAME is user name, Email is mailbox, Phone is mobile phone number.
  • list <string[]> Whitelist list, please note that the mailbox is not case sensitive.

# Example

var list = await managementClient.Whitelist.Add(WhitelistType.EMAIL, new string[] {"test@test.com" });

# Remove whitelist

WhitelistManagementClient().remove(type, list)

Remove whitelist

# Parameters

  • type <WhitelistType> Whitelist type, USERNAME is user name, Email is mailbox, Phone is mobile phone number.
  • list <string[]> Whitelist list, please note that the mailbox is not case sensitive.

# Example

var list = await managementClient.Whitelist.Remove(WhitelistType.EMAIL, new string[] {"test@test.com" });

# Open whitelist

WhitelistManagementClient().enable(type)

Open whitelist

# Parameters

  • type <WhitelistType> Whitelist type, USERNAME is user name, Email is mailbox, Phone is mobile phone number.

# Example

await managementClient.Whitelist.Enable(WhitelistType.EMAIL);

# Close whitelist

WhitelistManagementClient().disable(type)

Close whitelist

# Parameters

  • type <WhitelistType> Whitelist type, USERNAME is user name, Email is mailbox, Phone is mobile phone number.

# Example

await managementClient.Whitelist.Disable(WhitelistType.EMAIL);