Nowadays the fields in which machine-to-machine (M2M) applications are used and the numbers of M2M devices and users are increasing gradually. In an M2M application, M2M platforms are used in order to follow and analyze the data presented by M2M devices. The communication of multiple users and devices via an M2M platform causes some problems in terms of security. In this study, an M2M platform has been developed by using RestFul web services and NoSQL database. On this platform a token-based authentication method was used for multiple users and devices. In this method, an authorized request approach was adopted for authorized users and an unauthorized request approach was adopted for unauthorized users. In the token-based authentication method on the M2M platform no session information is kept. Thanks to the adopted method, in multiple processes carried out on the platform, not only was data traffic density decreased, but also security level was increased for both user and device authentication.