working example of getting token and sending as client Var