In this paper, we present a data-driven analysis of the $\gamma\gamma\to D^+D^-$ and D^0\bar{D}^0$ reactions from threshold up to 4.0 GeV in $D\bar{D}$ invariant mass. For $S$-wave contribution, adopt partial-wave dispersive representation, which is solved using $N/D$ ansatz. The left-hand cuts are accounted for model-independent conformal expansion. $D$-wave $\chi_{c2}(3930)$ state described a...