def prepare_token_request(grant_type, body=u'', **kwargs):
 params = [(u'grant_type', grant_type)]
 if (u'scope' in kwargs):
  kwargs[u'scope'] = list_to_scope(kwargs[u'scope'])
 for k in kwargs:
  if kwargs[k]:
   params.append((unicode_type(k), kwargs[k]))
 return add_params_to_qs(body, params)

def prepare_token_request ( grant_type , body = u'' , ** kwargs ) : params = [ ( u'grant_type' , grant_type ) ] if ( u'scope' in kwargs ) : kwargs [ u'scope' ] = list_to_scope ( kwargs [ u'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 .