convertUserToBotWithHttpInfo method

Future<Response> convertUserToBotWithHttpInfo(
  1. String userId
)

Convert a user into a bot

Convert a user into a bot. Minimum server version: 5.26 ##### Permissions Must have manage_system permission.

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): User GUID

Implementation

Future<Response> convertUserToBotWithHttpInfo(
  String userId,
) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/convert_to_bot'.replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}