Picture of Sebastian Hayer-Lutz (innovaphone)
Moderator Registered 7 years 164 days
Sebastian Hayer-Lutz (innovaphone) Monday, 28 October 2019, 04:15 PM in response to dirk39
Re: External application login
Hi Andrea,

this error seems to be the same that we have already discussed in Ticket 262364.

If you read the text below the JS example (in the SDK Documentation) we use the JS function "logon" after a successful Websocket connect to get an AUTH-token from an external Webservice.
We only use this way because the shared secret (Password in the AP-Object inside the PBX) should never exist in the JS because it is plain text in the end-user-environment in the most of cases.

So we will send the AUTH challenge to a separate Webserver, that is knowing the secret and can caluclate the correct logon token and send us the token back. (So the secret is never shared with the client - thats the goal)

You can check it in "Implement GET handler" (There we use a C++ App in our AP-Platform)

Anyway - You can create your own GET Handler (in your favorite programming language) or dont use it.

If you make a machine-to-machine connection (like old server side SOAP applications) you can use both methods:
1) Get a preculculated logon hash from the above solution
2) Store the password in your configuration/code directly

For a direct logon if you execute the code on the serverside you can check Line 39 in our Websocket Class:
function (url, app, password, domain, fonconnected, fonmessage, fonerror, fonclosed, fgetlogin)

There you can enter the data directly.

After a successfull authorization you can make an UserInitialize to the needed User and use your needed commands via Websocket.

Hope this helps. Otherwise please let me know


To access the code samples you need a password, correct.
I have send you the access data in our existing ticket for this case.
Please check it.

Best regards Basti
← You can define your color theme preference here