getUserAccessTokensWithHttpInfo method

Future<Response> getUserAccessTokensWithHttpInfo({
  1. int? page,
  2. int? perPage,
})

Get user access tokens

Get a page of user access tokens for users on the system. Does not include the actual authentication tokens. Use query parameters for paging. Minimum server version: 4.7 ##### Permissions Must have manage_system permission.

Note: This method returns the HTTP Response.

Parameters:

  • int page: The page to select.

  • int perPage: The number of tokens per page.

Implementation

Future<Response> getUserAccessTokensWithHttpInfo({
  int? page,
  int? perPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/users/tokens';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (perPage != null) {
    queryParams.addAll(_queryParams('', 'per_page', perPage));
  }

  const contentTypes = <String>[];

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