A non-transitory machine-readable storage medium that includes instructions that, when executed by one or more processors of a machine, cause the machine to perform operations comprising:
- storing an application programming interface (API), associated with a messaging application, on a server;
- establishing, via a JavaScript bridge, two one-way asynchronous communication channels between the messaging application and a web-based application, wherein functions of the API, invoked by the web-based application or the messaging application, are transmitted as messages over the asynchronous communication channels, such that each API function invocation is sent as a message, and callback for each API function is sent by constructing a unique callback identifier and sending a message with the callback identifier;
- providing, via the JavaScript bridge, an authentication token to the web-based application in response to receiving a request for the authentication token from the web-based application, wherein the authentication token expires after a prespecified period of time;
- and
- causing the web-based application to verify a level of access associated with a user by:
- providing, to the web-based application via the JavaScript bridge, a message from the messaging application comprising a user identifier and the level of access associated with the user;
- instructing the web-based application to search an application server associated with the web-based application for a remotely stored level of access associated with the user identifier;
- and
- instructing the web-based application to compare the level of access specified in a message received from the messaging application with the remotely stored level of access to verify the level of access of the user;
- providing a platform that facilitates communication between the messaging application and the web-based application, the platform storing a plurality of markup language documents associated with the web-based application, a first of the plurality of markup language documents corresponding to a first version of a given set of levels of the web-based application and a first level of access to the given set of levels and a second of the plurality of markup language documents corresponding to a second version of the given set of levels of the web-based application and a second level of access to the given set of levels, wherein the level of access is transmitted via the platform, and wherein:
- the web-based application comprises a web-based gaming application, wherein the first markup language document is obtained in response to determining that the level of access associated with the user corresponds to the first level of access;
- and
- the second markup language document is obtained in response to determining that the level of access associated with the user corresponds to the second level of access, and wherein the first and second markup language documents include different sets of features of the web-based application;
- and using the messaging application to complete a purchase transaction for a premium level of access to the web-based application with a third-party source.