class DiceAPI with getToken function