python
from oauth2client.contrib import gce
client_id = '<your_client_id>'
client_secret = '<your_client_secret>'
scope = '<requested_scope>'
flow = gce.OAuth2WebServerFlow(client_id=client_id, client_secret=client_secret, scope=scope)
auth_uri = flow.step1_get_authorize_url()
auth_code = '<authorization_code>'
credentials = flow.step2_exchange(auth_code)
access_token = credentials.access_token