update the token api to work with the latest training platform