In this paper we show that a normal affine toric variety X different from the algebraic torus is uniquely determined by its automorphism group in the category of affine irreducible, not necessarily normal, algebraic varieties if and only if X is isomorphic to the product of the affine line and another variety. In the case where X is the algebraic torus T, we reach the same conclusion if we restrict the category to only include irreducible varieties of dimension at most the dimension of T. There are examples of varieties of dimension one higher than T having the same automorphism group of T. Hence, this last result is optimal.