createMute abstract method

Future<TwitterResponse<MuteStateData, void>> createMute({
  1. required String userId,
  2. required String targetUserId,
})

Allows an authenticated user ID to mute the target user.

Parameters

  • userId: The user ID who you would like to initiate the mute on behalf of. It must match your own user ID or that of an authenticating user, meaning that you must pass the Access Tokens associated with the user ID when authenticating your request.

  • targetUserId: The user ID of the user that you would like the id to mute. The body should contain a string of the user ID inside of a JSON object.

Endpoint Url

Authentication Methods

  • OAuth 2.0 Authorization Code with PKCE
  • OAuth 1.0a

Required Scopes

  • tweet.read
  • users.read
  • mute.write

Rate Limits

  • User rate limit (OAuth 2.0 user Access Token): 50 requests per 15-minute window per each authenticated user

Reference

Implementation

Future<TwitterResponse<MuteStateData, void>> createMute(
    {required String userId, required String targetUserId});