Integrator's GraphQL API Guide


#61

Your username is emre?
That is windows services right? It would be asking for the windows user cradentials, nothing to do with samba…


#62

hi @JTRTech i know no this was an example to showing which step im strugeling… i did it with my username.


#63

And ‘Local System Account’ doesnt work.

As a service it would typically run before logon anyway so not sure what you need to change there…

Normally you just run the message server tool in the samba program folder and it has options for port and start/stop/restart. Only ever used that.


#64

I have been following the tutorial, however when I try to make a POST request to the localhost:9000/Token for a access key the request times out and I cant get the key. Any way around this?


#65

Something must be configured wrong if its not working correctly.


#66

I have checked the whole settings area, but I still cant make the request. Would it be firewall?

EDIT: Here is a screenshot of Postman, it wont send the request, it just stays on Sending


#67

Ive not accessed api that way myself but you sure its ment to be POST?
Other APIs I have worked with have always used GET.


#68

Scratch that, didnt look far enough back. It is post…
No response sugests its not header related as would expect some form of error message.
Firewall ports etc are posible but being localhost dont think thats the issue.


#69

I checked firewall, added the message server and stuff just in case (it was there anyway but I did it to check) tried to do a new request but it still wont complete a request


#70

Id check these settings first and permissions.


#71

I have checked them, here is my current settings. A secret key is there, just hidden for obvious reasons


#72

That says secret key but you sending user and password? Maybe?


#73

Nope, request still wont complete


#74

You screenshots looks like body is selected, shouldn’t you post headers?


#75

When I post headers, i get

  "error": "invalid_clientId",
  "error_description": "ClientId should be sent."
}

#76

You are running full SQL express and not the localdb install option right?


#77

Yes, full SQL Express 2016


#78

Well that surely is step closer than timeout…
So supply a client id no?


#79

It only hangs when I supply a client id

Now getting Error 500 Internal Server Error on the request


#80

Be sure to use the User’s Password, not the User’s PIN. You cannot authenticate using the PIN.

Some changes in SambaPOS require that you restart the Messaging Service so that it reloads it’s cache.

Restart the SambaPOS MessagingServer service using the Windows Services tool.


If you have configured the SambaPOS Application for All Functions in Local network, that means your client app (Postman) must be running on the same internal network that SambaPOS is running on. If it is not, then your client will not work.

If your client (Postman) is on a different Network (ie. across the Internet), then you will need to configure the SambaPOS Application for All Functions so that it allows remote connections to the Message Server.

Making changes to SambaPOS Application configuration will probably require that you restart the Service.