Class UserBlocksClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
Contains methods to access the /user-blocks endpoints.
public class UserBlocksClient : BaseClient, IUserBlocksClient- Inheritance
- 
      
      
      UserBlocksClient
- Implements
- Inherited Members
Constructors
UserBlocksClient(IManagementConnection, Uri, IDictionary<string, string>)
Initializes a new instance of UserBlocksClient.
public UserBlocksClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)Parameters
- connectionIManagementConnection
- IManagementConnection used to make all API calls. 
- baseUriUri
- Uri of the endpoint to use in making API calls. 
- defaultHeadersIDictionary<string, string>
- Dictionary containing default headers included with every request this client makes. 
Methods
GetByIdentifierAsync(string, CancellationToken)
Get a user's blocks by identifier.
public Task<UserBlocks> GetByIdentifierAsync(string identifier, CancellationToken cancellationToken = default)Parameters
- identifierstring
- The identifier of the user. Can be a user's email address, username or phone number. 
- cancellationTokenCancellationToken
- The cancellation token to cancel operation. 
Returns
- Task<UserBlocks>
- The UserBlocks relating to the user requested. 
GetByUserIdAsync(string, CancellationToken)
Get a user's blocks by user id.
public Task<UserBlocks> GetByUserIdAsync(string id, CancellationToken cancellationToken = default)Parameters
- idstring
- The id of the user. 
- cancellationTokenCancellationToken
- The cancellation token to cancel operation. 
Returns
- Task<UserBlocks>
- The UserBlocks relating to the user requested. 
UnblockByIdentifierAsync(string, CancellationToken)
Unblock a user by their identifier.
public Task UnblockByIdentifierAsync(string identifier, CancellationToken cancellationToken = default)Parameters
- identifierstring
- The identifier of the user to unblock. Can be a user's email address, username or phone number. 
- cancellationTokenCancellationToken
- The cancellation token to cancel operation. 
Returns
UnblockByUserIdAsync(string, CancellationToken)
Unblock a user by their id.
public Task UnblockByUserIdAsync(string id, CancellationToken cancellationToken = default)Parameters
- idstring
- The id of the user to unblock. 
- cancellationTokenCancellationToken
- The cancellation token to cancel operation.