Login user by HAL
Gastón Salomone
6-22-20
Operating system: macOS
Hi,

I wrote a webpublic function to integrate with an external application that need to create and update Contacts in SERP with Json structure.

External app send User and Password in Json fields and I need to validate and Login user so all updates are recorded as that User, but also because I cannot create Contacts and execute RecordCheck function if user is not Logged as there are many UserCanAction validations that requiere a valid user session.
Before version 8.5 I use "/DoLogin" web function with User and password parameters in URL by GET method but now it only work with POST method.
There is a funcion called SetCompanyAndLogin but I cannot find anything about it.

How I can login user by code ? Or how I Redirect to that /DoLogin page with Post data by hal?

Regards
Gastón Salomone
6-24-20
Hi,

I realize that this question is in a wrong section. Please is it posible to move this to Hal section to get a proper answer.

Regards
Nejc R.
7-13-20
Generally its BAD practice having the server call itself to login and I would very much recommend against it and to instead use the API.

In this case using the API would be recommended as you can probably directly integrate with the external app. But if you want to keep using the old code you can use the SendWebRequest function to send a post request. What function were you using to send the GET data?
Swati D.
9-10-20
Hi Gaston

As per skype chat we are closing this request

Swati 2020.9.10
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
Latest Posts
Afternoon, Some of our customers haven't changed their passwords for a while but they're not getting any password expiry message. If I copy their Standard ID into a new user on some test ...
17:22 25 Apr 2024
Andis Blicāns, Grasko
Hi, We have client using 8.5 2021-09-26 (build 85400383). The fields "Max Web Users" and "Max Sessions" ar blank. Server is closing itself almost every day. Message in hansa....
13:09 25 Apr 2024