GQL connection issue

I restored my computer and trying to setup GQL with @QMcKay customer display setup but having very weird issues. At your module main screen I just get login pin pad but no password of mine works.

I open message server service tool and setup for port 8383. Samba connects just fine. When I go back into the tool and add 8383+ to activate GQL samba no longer can connect. I direct browser to localhost:8383 and it loads GQL page but shows message “message”: “Authorization has been denied for this request.”

I tried restarting sambapos message service and no luck. Tried changing message server port but that doesnt fix the issue and also seems to be buggy considering when I restart my computer it goes back to 8383+.

Anyone know what could be the issue here?
BTW this is all in the same computer so no firewall issues or anything should be happening here. Regardless I disabled firewall.

Ensure SambaPOS client Message Server Name is configured to use http://servername/ … it is the http:// part that is important …

GQL requires authorization as of .61. I think the latest GIT of GQL-modules has this built-in so long as you set in config.js:

var SambaPOS = '5.1.61';

… without that ^ version information it will bypass GQL Auth, but if you are running .61 then you cannot do anything when it is bypassed, because it cannot perform Auth (der).

The GIT pull probably has the above set to:

var SambaPOS = '5.1.60';

… this is because most people will probably be running .60 at this time. If you are running .61 (which you should do with GQL-modules, because a lot of GQL has changed between 60 and 61), then you must to set it to 5.1.61

As for the GraphiQL interface, the same thing applies. You must Authorize GQL first. You generally only need to do this once. Go to:


Now edit the address bar to the following and hit enter:


You should be prompted for username and password which for now it is “sambapos” and “password”, respectively (the Password is the important part and is currently hard-coded to: password). So enter that info and click Go.

Nothing will appear to happen.

Click the BACK button on your Browser, which will take you back to:


Now the Auth Message should be gone and you can do stuff.

1 Like

Do we need to install Wamp server or is that built into Samba Now?

A light-weight Webserver (running on port 80) is built in to SambaPOS so you do not need to use Wamp. Personally, I use IIS, but it is up to you. If you use Wamp it will conflict with SambaPOS Webserver on port 80 unless you configure Wamp to use a different port.

:bulb: NOTE: the Webserver port has nothing to do with the GQL port. They are different things.

To use SambaPOS Webserver, put the code in a subfolder of:

C:\Program Files (x86)\SambaPOS5\apps\

… for example, if you copy all the code from the GIT from inside html folder to here:

C:\Program Files (x86)\SambaPOS5\apps\GQLmodules\

… then you access the Modules with:


If you were to drop just the folder into:

C:\Program Files (x86)\SambaPOS5\apps\html\

… then you access the Modules with:


So I have verified that var SambaPOS=‘5.1.61’ but still just getting pin pad to enter password in main screen. I am not getting a message to enter username and password. When I navigate to \login i get white screen in browser. Do I need node.js or anything else

For my customer display screen I obviously dont want authentication. I just want it to automatically connect.

You should be seeing this in GraphiQL for the login page:

Get that ^ working first, and ensure you can get into GraphiQL past the “Authorization has been denied …” message.

Ensure you have the Report named GQLM Users configured in SambaPOS. This is required for PIN login to the Modules.

:bulb: NOTE: the PIN login is different and separate from GQL Auth.

You can also specify a list of IPs in config.js that are allowed to bypass PIN login, and then it should bypass the PIN screen (it may temporarily flash onscreen then disappear).

var bypassIPs = [];          // if not Bypassing ALL Authentication, list the IPs that are allowed to bypass Authentication.
    // if one of listed IPs are matched, then defaultUser will be used to Authenticate, UNLESS the user EXPLICITLY Logs Out.
    bypassIPs.push('::1'); // localhost IPv6
    bypassIPs.push(''); // localhost IPv4
    bypassIPs.push(''); // Server IPv4

If you are still having problems, we can move on from there. You are likely going to need to look at the DevTools Console in Chrome (or whatever Browser) to check for error messages. GQL-modules is very verbose in it’s logging of what it is trying to do.

1 Like