In the present paper we address the interaction of charmed mesons in hidden charm channels in a finite box. We use the interaction from a recent model based on heavy quark spin symmetry that predicts molecules of hidden charm in the infinite volume. The energy levels in the box are generated within this model, and several methods for the analysis of these levels (inverse problem) are investigated.