Update event creation to use dictionary to generate token