In the application on JS it is necessary to store some data in the database. For this, a simplest REST server was written using Yii2. Fortunately, there it is done to the horror simply.
But the question arose - what needs to be done, what technologies to apply, so that the server works only with my application? Those. so that no one could "from the side" perform any operation.

access_token, necessary for working with the social API. network. Already this will be enough to perform any actions using the server REST-API. - Ilya Bizunov