Some applications require access to APIs on behalf of the user even when the user is not present, i.e. offline access. OAuth is a protocol that allows applications to obtain a token to access an API when the user is not present but when the tokens expire they need to be renewed. Some APIs like Google and Box.net support automatic renewal of expired tokens. Read this article to learn how to use this OAuth client class to perform offline access to an API storing tokens in a database and how to have expired tokens automatically renewed.