1

API JS - SID and user

Тема: API JS - SID and user

By means of API JS getting the SID how can I know the parent account of the user that I entered?

Example:

Creative account "transportLine", user that was created by the account "monitor1". So what is required is that with the SID of the monitor user he can know the "TransportLine" account. Can it be done with the JS API?

2

API JS - SID and user

(28/09/2018 12:09:48 отредактировано rual)

Re: API JS - SID and user

When you login, there is user.bact field with user's account id.

But if you need parent account, execute core/get_account_data:

session.getAccountData(false, function(error, result) { console.log(result); })

It will contain parentAccountId and parentAccountName.