Trigger authorization dialog

    :param str client_id: Client ID
    :param str redirect_uri: Application Redirect URI
    :param str state: Application State
    :param List[str] scopes: Scopes to request
    :param bool show_dialog: Show the dialog
    :param http_client: HTTP Client for requests
    :return str Authorize URL
    :rtype str

def authorize_url(client_id=None, redirect_uri=None, state=None, scopes=None, show_dialog=False, http_client=None):
    """
    Trigger authorization dialog

    :param str client_id: Client ID
    :param str redirect_uri: Application Redirect URI
    :param str state: Application State
    :param List[str] scopes: Scopes to request
    :param bool show_dialog: Show the dialog
    :param http_client: HTTP Client for requests
    :return str Authorize URL
    :rtype str
    """
    params = {
        'client_id': client_id or os.environ.get('SPOTIFY_CLIENT_ID'),
        'redirect_uri': redirect_uri or os.environ.get('SPOTIFY_REDIRECT_URI'),
        'state': state or str(uuid.uuid4()).replace('-', ''),
        'scope': ' '.join(scopes) if scopes else '',
        'show_dialog': show_dialog,
        'response_type': 'code'
    }
    query = ['{}={}'.format(k, v) for k, v in params.items()]
    return '{}?{}'.format('https://accounts.spotify.com/authorize', '&'.join(query))