public function getAuthUrl($endpoint = null)
    {
        if ($endpoint !== null) {
            $this->endpoint = $endpoint;
        }
        $query_string = [
            'response_type' => self::RESPONSE_TYPE,
            'client_id'     => $this->client_id,
            'redirect_uri'  => $this->redirect_uri,
            'scope'         => implode(',', $this->scope),
        ];

        return $this->endpoint.self::OAUTH_AUTHORIZE.'?'.http_build_query($query_string);
    }