  We prove that the $D_4$ root system (the set of vertices of the regular
$24$-cell) is the unique optimal kissing configuration in $\mathbb R^4$, and is
an optimal spherical code. For this, we use semidefinite programming to compute
an exact optimal solution to the second level of the Lasserre hierarchy. We
also improve the upper bound for the kissing number problem in $\mathbb R^6$ to
$77$.
