createApiOnlyUsers method

Future<TCreateApiOnlyUsersResponse> createApiOnlyUsers({
  1. required TCreateApiOnlyUsersBody input,
})

Create API-only users in an existing organization.

Sign the provided TCreateApiOnlyUsersBody with the client's stamp function and submit the request (POST /public/v1/submit/create_api_only_users).

See also: stampCreateApiOnlyUsers.

Implementation

Future<TCreateApiOnlyUsersResponse> createApiOnlyUsers({
  required TCreateApiOnlyUsersBody input,
}) async {
  final body = packActivityBody(
    bodyJson: input.toJson(),
    fallbackOrganizationId: input.organizationId ??
        config.organizationId ??
        (throw Exception(
            "Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
    activityType: 'ACTIVITY_TYPE_CREATE_API_ONLY_USERS',
  );
  return await request<Map<String, dynamic>, TCreateApiOnlyUsersResponse>(
      "/public/v1/submit/create_api_only_users",
      body,
      (json) => TCreateApiOnlyUsersResponse.fromJson(
          transformActivityResponse(json, 'CreateApiOnlyUsers')));
}