def request_oauth_token(request):
    # We'll require a refresh in the blue dot cache
    if BLUE_DOT_CACHE_KEY in request.session:
        del request.session[BLUE_DOT_CACHE_KEY]

    access_token_callback = settings.QUICKBOOKS['OAUTH_CALLBACK_URL']
    if callable(access_token_callback):
        access_token_callback = access_token_callback(request)

    session = OAuth1Session(client_key=settings.QUICKBOOKS['CONSUMER_KEY'],
                            client_secret=settings.QUICKBOOKS['CONSUMER_SECRET'],
                            callback_uri=access_token_callback)

    response = session.fetch_request_token(REQUEST_TOKEN_URL)

    try:
        request_token = response['oauth_token']
        request_token_secret = response['oauth_token_secret']

        request.session['qb_oauth_token'] = request_token
        request.session['qb_oauth_token_secret'] = request_token_secret
    except:
        logger = logging.getLogger('quickbooks.views.request_oauth_token')
        logger.exception(("Couldn't extract oAuth parameters from token " +
                          "request response. Response was '%s'"), response)
        raise
    return HttpResponseRedirect("%s?oauth_token=%s" % (AUTHORIZATION_URL, request_token))