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:
- providing a platform that facilitates communication between a messaging application and a 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;
- storing an application programming interface (API), associated with the messaging application, on a server;
- establishing, via a JavaScript bridge, two one-way asynchronous communication channels between the messaging application and the 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 of the platform, an authentication token to the web-based application in response to receiving a request for the authentication token from the web-based application via the platform, wherein the authentication token expires after a prespecified period of time;
- receiving, from a graphical user interface of the messaging application, a request to launch the web-based application;
- determining, by the messaging application, a level of access associated with a user of the messaging application for the web-based application;
- transmitting, by the messaging application to the web-based application via the JavaScript bridge, the level of access associated with the user;
- causing the web-based application to verify the level of access associated with the 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;
- searching an application server associated with the web-based application for a remotely stored level of access associated with the user identifier;
- and
- comparing 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;
- obtaining one of the first and second markup language documents based on the level of access associated with the user;
- and
- launching the obtained one of the first and second markup language documents to provide access to a first set of features of the web-based application that are associated with the level of access associated with the user.