Table of Contents

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

connection IManagementConnection

IManagementConnection used to make all API calls.

baseUri Uri

Uri of the endpoint to use in making API calls.

defaultHeaders IDictionary<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

identifier string

The identifier of the user. Can be a user's email address, username or phone number.

cancellationToken CancellationToken

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

id string

The id of the user.

cancellationToken CancellationToken

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

identifier string

The identifier of the user to unblock. Can be a user's email address, username or phone number.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous unblock operation.

UnblockByUserIdAsync(string, CancellationToken)

Unblock a user by their id.

public Task UnblockByUserIdAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The id of the user to unblock.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous unblock operation.