Scaffolding for making requests and automated token refresh