Visualforce

If you are using ts-force in an application running in VisualForce, obtaining an access token is simple:

<apex:page showHeader="true" sidebar="false" standardStylesheets="false" docType="html-5.0">
    <script type="text/javascript">
        //rest details
        const __ACCESSTOKEN__ = '{!JSENCODE($Api.Session_ID})';
        const __RESTHOST__ = '{!JSENCODE(URLFOR("/", null)})';
    </script>
    <div id="root"></div>
</apex:page>

Last updated

Was this helpful?