<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Repetier Server API logs me out immediately</title>
        <description> Hey there, 

I am trying to use the Repetier Server API for a project. When logging in, the server logs me out immediately:


&amp;gt; {&quot;action&quot;: &quot;login&quot;, &quot;callback_id&quot;: 2, &quot;data&quot;: {&quot;rememberMe&quot;: true, &quot;login&quot;: &quot;delta&quot;, &quot;password&quot;: &quot;3e87a0f2996c4e4dd53eda8f54f643ad&quot;}}
&amp;lt; {u&#039;callback_id&#039;: 2, u&#039;session&#039;: u&#039;ZkQl^ha@Ym&amp;amp;jjqgKrtUNmVyMNjf$9j6v&#039;, u&#039;data&#039;: {u&#039;login&#039;: u&#039;delta&#039;, u&#039;settings&#039;: {}, u&#039;ok&#039;: True, u&#039;permissions&#039;: 15}}
&amp;lt; {u&#039;callback_id&#039;: -1, u&#039;eventList&#039;: True, u&#039;data&#039;: [{u&#039;data&#039;: {}, u&#039;event&#039;: u&#039;logout&#039;}, {u&#039;data&#039;: {u&#039;login&#039;: u&#039;delta&#039;, u&#039;settings&#039;: {}, u&#039;permissions&#039;: 15}, u&#039;event&#039;: u&#039;userCredentials&#039;}]}

When deleting any user and sending plain &quot;send&quot; commands, I get this:

&amp;gt; {&quot;action&quot;: &quot;send&quot;, &quot;callback_id&quot;: 2, &quot;printer&quot;: &quot;Delta&quot;, &quot;data&quot;: {&quot;cmd&quot;: &quot;G28&quot;}}
&amp;lt; {u&#039;callback_id&#039;: 2, u&#039;session&#039;: u&#039;Cj$%!&amp;amp;*bb6!fUjvx90kAxa0235%XcIu5&#039;, u&#039;data&#039;: {}}
&amp;gt; {&quot;action&quot;: &quot;send&quot;, &quot;callback_id&quot;: 3, &quot;printer&quot;: &quot;Delta&quot;, &quot;data&quot;: {&quot;cmd&quot;: &quot;G28&quot;}}
&amp;lt; {u&#039;callback_id&#039;: -1, u&#039;eventList&#039;: True, u&#039;data&#039;: [{u&#039;data&#039;: {u&#039;login&#039;: u&#039;global&#039;, u&#039;settings&#039;: {u&#039;gcodeViewMode&#039;: u&#039;0&#039;, u&#039;tempDiagMode&#039;: u&#039;0&#039;}, u&#039;permissions&#039;: 65535}, u&#039;event&#039;: u&#039;userCredentials&#039;}]}

Nothing happens with the printer at any times though I am able to trigger commands via the command line interface of the server. Can you tell me what the problem is?

Regards</description>
        <link>https://reprap.org/forum/read.php?267,515146,515146#msg-515146</link>
        <lastBuildDate>Sun, 12 Apr 2026 11:44:01 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,516183#msg-516183</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,516183#msg-516183</link>
            <description><![CDATA[ Yes, you always need to use the slug name for every action. It has no spaces etc. and stays the same even if you rename the printer. listPrinter lists all names along with internal slug name.]]></description>
            <dc:creator>repetier</dc:creator>
            <category>Repetier</category>
            <pubDate>Mon, 01 Jun 2015 08:32:38 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,516178#msg-516178</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,516178#msg-516178</link>
            <description><![CDATA[ When I finally found the window with the Websocket traffic (it was hidden and I had to slide down a slider to find it...), I saw that the printer had a different name internally than I specified. There it is called "Delta2" and not "Delta".<br />
<br />
I saw the string before when using "listPrinter" but I didn't think about trying it out with this printer name.<br />
<br />
Your demo also didn't list "Delta2" (and it sends {"action":"send","data":{"cmd":"M119"},"printer":"","callback_id":778}). This is such a stupid problem but I am happy it finally works. Thanks!]]></description>
            <dc:creator>magmabyte</dc:creator>
            <category>Repetier</category>
            <pubDate>Mon, 01 Jun 2015 08:20:46 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,516158#msg-516158</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,516158#msg-516158</link>
            <description><![CDATA[ The only security that might be there is if your user has no print permission.<br />
<br />
Since it works from normal frontend debug there what to send. All you need to do is open debugger in chrom and select the socket file in network tab (reload for it to appear) and go to preview I think it is. Then you see a nice list of commands send and received. Everything is json so it is easy to read, Then send G28 from there and see what the package contains.]]></description>
            <dc:creator>repetier</dc:creator>
            <category>Repetier</category>
            <pubDate>Mon, 01 Jun 2015 07:22:05 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,516156#msg-516156</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,516156#msg-516156</link>
            <description><![CDATA[ Didn't work for me with Chromium. ;)<br />
<br />
Okay, so I tried both the Demo and my code again. Neither worked. Send in the Python code looks like this: {"action": "send", "callback_id": 2, "printer": "Delta", "data": {"cmd": "G28"}}. For Send in the demo I typed "send" for Action and {"cmd": "G28"} for JSON payload. I can send other commands with my Python code and the Demo.<br />
<br />
As you said and as far as I can tell your Web API does the same thing (there I just typed "G28" in the console). Could this be some kind of security feature? Do you know of a convient way to debug Websockets?]]></description>
            <dc:creator>magmabyte</dc:creator>
            <category>Repetier</category>
            <pubDate>Mon, 01 Jun 2015 07:13:43 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,515490#msg-515490</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,515490#msg-515490</link>
            <description><![CDATA[ https was in deed missing. Strangely it worked anyway :-) Clever chrome seems to have fixed it.<br />
<br />
The Web UI also uses send for homing so there is no reason why it should not work except perhaps a spelling error. You can open console with send commands enabled and see if the server sees you G28. If you see it there and printer does not react let me know.]]></description>
            <dc:creator>repetier</dc:creator>
            <category>Repetier</category>
            <pubDate>Sat, 30 May 2015 08:45:41 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,515481#msg-515481</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,515481#msg-515481</link>
            <description><![CDATA[ Okay, currently I do not have access to the printer. I will try again on Monday. Sadly, I have changed nothing and I don't really know what the problem is. <br />
<br />
I am able to successfully execute "send" commands in the console of the server's web GUI but not via the API and my Python client (I can send them and get a response but the printer is unaffected). Hopefully, it works with the Demo (any other command that I tried seems to work but these work also with my Python client) and I will check whether it does anything different. Is there any other way to send G-Code to the printer, perhaps via uploading and executing files?<br />
<br />
The demo I downloaded seemed to be missing the "https:" for the jquery libraries.]]></description>
            <dc:creator>magmabyte</dc:creator>
            <category>Repetier</category>
            <pubDate>Sat, 30 May 2015 07:51:38 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,515459#msg-515459</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,515459#msg-515459</link>
            <description><![CDATA[ With demo I thought you were using the testing application at the bottom of the api documentation:<br />
<br />
[<a href="http://www.repetier-server.com/manuals/programming/API/index.html" target="_blank"  rel="nofollow">www.repetier-server.com</a>]<br />
<br />
which you can use for testing. Works really good and is helpfull if you are not sure what to expect. Use it myself from time to time.<br />
<br />
logout event comes when you send a logout command to server. Then it resets the associated user to none. Do you send a logout before login?<br />
<br />
On action send with {"cmd":"G28" } you get only a empty response that is correct. You never see any answers from the firmware. These go into state and get reported there.]]></description>
            <dc:creator>repetier</dc:creator>
            <category>Repetier</category>
            <pubDate>Sat, 30 May 2015 06:25:54 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,515456#msg-515456</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,515456#msg-515456</link>
            <description><![CDATA[ Somehow it stopped working when users are required to log in. I have updated it so it now works with login as well.<br />
<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong>repetier</strong><br />See demo code what I mean.</div></blockquote>
What do you mean by demo? I am using the current Windows version at [<a href="http://www.repetier-server.com/download-repetier-server/" target="_blank"  rel="nofollow">www.repetier-server.com</a>]. My references were [<a href="http://www.repetier-server.com/manuals/programming/API/index.html" target="_blank"  rel="nofollow">www.repetier-server.com</a>] and [<a href="https://github.com/repetier/Repetier-Server" target="_blank"  rel="nofollow">github.com</a>]. I can not find a demo besides the API examples.<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong>repetier</strong><br />It's a bit tricky as you can get a permissionDenied at the beginning which you need to catch especially if you have already send a login request ignore all permission denied until the callback id of the login is handled. </div></blockquote>
permissionDenied seems to work fine. I get the event only when I am not logged in, even after the logout event. Does the logout event have any relevance? I seem to be logged in still. I get<br />
<pre class="bbcode">
{u'callback_id': -1, u'eventList': True, u'data': [{u'data': {}, u'event': u'logout'}, {u'data': {u'login': u'delta', u'settings': {}, u'permissions': 15}, u'event': u'userCredentials'}]}</pre>
from the server (logout in an eventList) after I send to the server the login request<br />
<pre class="bbcode">
{"action": "login", "callback_id": 2, "data": {"login": "delta", "password": "fe46844b93ad908aaa0cbfd967b6594f"}}</pre>
<br />
Also, do you have any idea why can't execute the simple "G28" command when sending "send" and receiving "'data': {}"? According to the API it is the correct response?]]></description>
            <dc:creator>magmabyte</dc:creator>
            <category>Repetier</category>
            <pubDate>Sat, 30 May 2015 06:04:31 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,515450#msg-515450</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,515450#msg-515450</link>
            <description><![CDATA[ Somehow it stopped working when users are required to log in. I have updated it so it now works with login as well.<br />
<br />
It's a bit tricky as you can get a permissionDenied at the beginning which you need to catch especially if you have already send a login request ignore all permission denied until the callback id of the login is handled. See demo code what I mean.]]></description>
            <dc:creator>repetier</dc:creator>
            <category>Repetier</category>
            <pubDate>Sat, 30 May 2015 05:23:34 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,515443#msg-515443</guid>
            <title>Re: Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,515443#msg-515443</link>
            <description><![CDATA[ Okay, it seems to be that despite the event in the event list I am still online and able to send events. As I just realized "'data': {}" is actually the correct response of the server to "send" commands. These events I get both when no user is defined or an user is defined I am logged in and I am sending "send" commands. However, the printer is unaffected. I am wondering whether "G28" is a valid G-Code command to send with the API. As I mentioned, I am able to execute it in the web interface.<br />
<br />
Logging in as "delta":<br />
<pre class="bbcode">
&gt; {"action": "login", "callback_id": 2, "data": {"login": "delta", "password": "fe46844b93ad908aaa0cbfd967b6594f"}}
&lt; {u'callback_id': 2, u'session': u'gpaJoZ^hOq1SuMc@eLykDajVK8W8xdAj', u'data': {u'login': u'delta', u'settings': {}, u'ok': True, u'permissions': 15}}
&gt; {"action": "send", "callback_id": 3, "printer": "Delta", "data": {"cmd": "G28"}}
&lt; {u'callback_id': -1, u'eventList': True, u'data': [{u'data': {}, u'event': u'logout'}, {u'data': {u'login': u'delta', u'settings': {}, u'permissions': 15}, u'event': u'userCredentials'}]}
&lt; {u'callback_id': 3, u'session': u'gpaJoZ^hOq1SuMc@eLykDajVK8W8xdAj', u'data': {}}</pre>
<br />
Not logging in with user "delta" defined:<br />
<pre class="bbcode">
{"action": "send", "callback_id": 2, "printer": "Delta", "data": {"cmd": "G28"}}
{u'callback_id': 2, u'session': u'8$JXMTtuLmRDCzzmetuAQp9#bb$t3dkj', u'data': {u'permissionDenied': True}}
</pre>]]></description>
            <dc:creator>magmabyte</dc:creator>
            <category>Repetier</category>
            <pubDate>Sat, 30 May 2015 04:31:20 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,515146,515146#msg-515146</guid>
            <title>Repetier Server API logs me out immediately</title>
            <link>https://reprap.org/forum/read.php?267,515146,515146#msg-515146</link>
            <description><![CDATA[ Hey there, <br />
<br />
I am trying to use the Repetier Server API for a project. When logging in, the server logs me out immediately:<br />
<br />
<pre class="bbcode">
&gt; {"action": "login", "callback_id": 2, "data": {"rememberMe": true, "login": "delta", "password": "3e87a0f2996c4e4dd53eda8f54f643ad"}}
&lt; {u'callback_id': 2, u'session': u'ZkQl^ha@Ym&amp;jjqgKrtUNmVyMNjf$9j6v', u'data': {u'login': u'delta', u'settings': {}, u'ok': True, u'permissions': 15}}
&lt; {u'callback_id': -1, u'eventList': True, u'data': [{u'data': {}, u'event': u'logout'}, {u'data': {u'login': u'delta', u'settings': {}, u'permissions': 15}, u'event': u'userCredentials'}]}</pre>
<br />
When deleting any user and sending plain "send" commands, I get this:<br />
<pre class="bbcode">
&gt; {"action": "send", "callback_id": 2, "printer": "Delta", "data": {"cmd": "G28"}}
&lt; {u'callback_id': 2, u'session': u'Cj$%!&amp;*bb6!fUjvx90kAxa0235%XcIu5', u'data': {}}
&gt; {"action": "send", "callback_id": 3, "printer": "Delta", "data": {"cmd": "G28"}}
&lt; {u'callback_id': -1, u'eventList': True, u'data': [{u'data': {u'login': u'global', u'settings': {u'gcodeViewMode': u'0', u'tempDiagMode': u'0'}, u'permissions': 65535}, u'event': u'userCredentials'}]}</pre>
<br />
Nothing happens with the printer at any times though I am able to trigger commands via the command line interface of the server. Can you tell me what the problem is?<br />
<br />
Regards]]></description>
            <dc:creator>magmabyte</dc:creator>
            <category>Repetier</category>
            <pubDate>Fri, 29 May 2015 09:15:07 -0400</pubDate>
        </item>
    </channel>
</rss>
