def prepare_token_request(grant_type, body='', **kwargs):
    params = [('grant_type', grant_type)]

    if 'scope' in kwargs:
        kwargs['scope'] = list_to_scope(kwargs['scope'])

    for k in kwargs:
        if kwargs[k]:
            params.append((unicode_type(k), kwargs[k]))

    return add_params_to_qs(body, params)
Prepare the access token request.
dataset/ETHPy150Open idan/oauthlib/oauthlib/oauth2/rfc6749/parameters.py/prepare_token_request