--- title: "Creating a custom CoBrowse UI" slug: "cobrowse-creating-a-custom-ui" description: "Create custom UI elements for cobrowsing sessions with JavaScript methods: open, start, prompt, and end sessions seamlessly." updated: 2023-08-24T16:08:32Z published: 2023-08-24T16:08:32Z canonical: "docs.screenmeet.com/cobrowse-creating-a-custom-ui" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.screenmeet.com/llms.txt > Use this file to discover all available pages before exploring further. # Creating a Custom UI If you would like to develop your own UI elements to start a session the following JavaScript methods are provided. ### Open Modal ```javascript window.Cobrowse.modal.openModal() ``` will open the provided ScreenMeet session start modal. The ScreenMeet provided modal is not injected into the page until this method is called at least once. --- ### Start Session ```javascript window.Cobrowse.modal.startSession(pin) ``` which given a 6 digit string of numbers will begin a cobrowsing session. This is intended to be used by an alternate UI element. This method returns a promise with a boolean, indicating if the session has started. It will immediately begin a cobrowse session on the client side. --- ### Prompt Session ```javascript window.Cobrowse.modal.promptSession(pin) ``` which given a 6 digit string of numbers will offer to begin a cobrowsing session. It will open a modal prompting the user to accept a session. The user may accept or decline. --- ### End Session ```javascript window.Cobrowse.modal.endSession() ``` will end any current cobrowse session.