I came along with another issue on Live Agent this morning:

Now when I test the button, it loads the proper page but I came along a new message stating something like: "Chat window can be run only through the button - You do not have direct access to it." I got the code from the default chat window by doing a "code inspection" with Safari because I wanted to keep the translations in polish that Salesforce generated. I just copied it to the custom page I created and off course it doesn't work :(

This is the screenshot of the error:

Error Message

Of course, I did not wanted that Salesforce layout and I guess it's not going to show up when the error will be fixed.

This is the code from the page:


This second code works but same layout issue:

Chat Page


Thanks for your help!


  • I corrected the layout issue adding the following APEX line: <apex:page showHeader="false"> but still can't find the line that shows the "You do not have direct access to it" error.
    – Niko
    Nov 3, 2014 at 11:44
  • 1
    I think you post the code here, some people (like me) don't have access to those dropbox links.
    – PepeFloyd
    Nov 3, 2014 at 12:11
  • @PepeFloyd did you tried to copy/paste it? because I made the link public so there is no reasons it doesn't work... I added them also on Google Drive now.
    – Niko
    Nov 3, 2014 at 13:12
  • @PepeFloyd any idea on where this code gets wrong?
    – Niko
    Nov 4, 2014 at 9:13
  • I can't see your code, my corporate network has blocked dropbox and google drive. It will be better if you post the actual code in the question itself.
    – PepeFloyd
    Nov 4, 2014 at 10:05

1 Answer 1


It seems like you are trying to call the chat window page directly, this is not allowed.

You need to create a custom chat window page as per the instructions in the Live Agent Developer guide, once you have created that page, go to:

Setup > Live Agent > Chat Buttons > Yourbutton (Edit) > Custom Chat Page (Select your new page here) > Save

Then launch the start as usual using the button code.

Sample Page:

<apex:page showHeader="false">
body { overflow: hidden; width: 100%; height: 100%; padding: 0; margin: 0 }
#waitingMessage { height: 100%; width: 100%; vertical-align: middle; text-align: center; display: none; }
#liveAgentClientChat.liveAgentStateWaiting #waitingMessage { display: table; }
#liveAgentSaveButton, #liveAgentEndButton { z-index: 2; }
.liveAgentChatInput {
    height: 25px;
    border-width: 1px;
    border-style: solid;
    border-color: #000;
    padding: 2px 0 2px 4px;
    background: #fff;
    display: block;
    width: 99%;
.liveAgentSendButton {
    display: block;
    width: 60px;
    height: 31px;
    padding: 0 0 3px;
    position: absolute;
    top: 0;
    right: -67px;
#liveAgentChatLog {
    width: auto;
    height: auto;
    top: 0px;
    position: absolute;
    overflow-y: auto;
    left: 0;
    right: 0;
    bottom: 0;
<div style="top: 0; left: 0; right: 0; bottom: 0; position: absolute;">
<liveAgent:clientchat >
    <liveAgent:clientChatSaveButton label="Save Chat" />
    <liveAgent:clientChatEndButton label="End Chat" />
    <div style="top: 25px; left: 5px; right: 5px; bottom: 5px; position: absolute; z-index: 0;">
    <liveAgent:clientChatAlertMessage />
    <liveAgent:clientChatStatusMessage />
    <table id="waitingMessage" cellpadding="0" cellspacing="0">
    <td>Please wait while you are connected to an available agent.</td>
    <div style="top: 0; right: 0; bottom: 41px; left: 0; padding: 0; position: absolute; word-wrap: break-word; z-index: 0;">
    <liveAgent:clientChatLog />
    <div style="position: absolute; height: auto; right: 0; bottom: 0; left: 0; margin-right: 67px;">
        <liveagent:clientChatInput /><liveAgent:clientChatSendButton label="Send"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.