Documentation: `/oauth2/authorize
        <https://www.wepay.com/developer/reference/oauth2#authorize>`_.

        .. note::
    
           This is not an API call but an actual uri that you send the user to.

def authorize(self, client_id, redirect_uri, scope, 
                  state=None, user_name=None, user_email=None):
        """Documentation: `/oauth2/authorize
        <https://www.wepay.com/developer/reference/oauth2#authorize>`_.

        .. note::
    
           This is not an API call but an actual uri that you send the user to.

        """
        query = [
            ('client_id', client_id),
            ('redirect_uri', redirect_uri),
            ('scope', scope)
        ]
        if user_name is not None:
            query.append(('user_name', user_name))
        if user_email is not None:
            query.append(('user_email', user_email))
        if state is not None:
            query.append(('state', state))
        return '%s/oauth2/authorize?%s' % (
            self._api.browser_endpoint, urllib.parse.urlencode(query))