import random
import string


def generate_random_token(length: int):
    """Generate random token by given length."""
    return "".join(random.choice(string.ascii_letters + string.digits) for _ in range(length))