  Let $N_{\alpha,\beta}(d)$ denote the maximum size of a spherical two-distance
set in $\mathbb{R}^d$ such that the inner products of distinct vectors only
take $\alpha$ and $\beta$. By considering the correspondence between spherical
two-distance sets and graphs with specific spectral properties, we determine
$N_{\alpha,\beta}(d)$ for fixed $-1\leq\beta<0\leq\alpha<1$ and sufficiently
large $d$, which extends the work in [Equiangular lines with a fixed angle,
Ann. Math. 194 (2021) 729-743] and [Spherical two-distance sets and eigenvalues
of signed graphs, Combinatorica 43 (2023) 203-232]. The limit
$\lim_{d\rightarrow\infty}N_{\alpha,\beta}(d)/d$ is also derived from our work,
that is, the problem of determining
$\lim_{d\rightarrow\infty}N_{\alpha,\beta}(d)/d$ for any fixed
$-1\leq\beta<0\leq\alpha<1$ is completely solved in the spherical
$\{\alpha,\beta\}$-code setting.
