got API key token generation working