After API creation, set whether to test whether the token is valid by performing a lightweight request