cred = oauth2client.client.GoogleCredentials(access_token, client_id,
    client_secret, refresh_token, expires_at,
    'https://accounts.google.com/o/oauth2/token', some_user_agent)
http = cred.authorize(httplib2.Http())
cred.refresh(http)
self.gmail_service = discovery.build('gmail', 'v1', credentials=cred)
Google API: getting Credentials from refresh token with oauth2client.client