GETALL/Login
Arguments
- useridstring
The user id.
- passwordstring
The user's password
- accountNamestring
The name of account to login to. Only applies if user is a member of more than one account.
Returns
- resultJSON Object
Returns an object with these properties:
- errorboolean
true if there was an error
- resultobject
An object that contains the following information:
- loginOKboolean
true if credentials are OK, otherwise false
- signincompleteboolean
Will be true if credentials are OK and a valid account name is specified, or if user is only a member of one account. Will be false if the credentials are OK but an invalid account name is specified -- or is missing.
- accountsobject array
An array of accounts for user. Only returned if signincomplete is false. Each entry in the array will contain the following properties:
- accountDisplayNamestring
The display name for the account.
- accountNamestring
The account name. This is the account name you must specify in the accountName parameter when calling the /Login method.
- JWTstring
For use by Super User Only.
Description
Login to TransForm account.
If the user is a member of multiple accounts, you must specify the user account. If you do not specify a valid user account, you will be given a list of accounts for the user. For example:
{ "error": false, "result": { "loginOK": true, "signincomplete": false, "accounts": [ { "accountDisplayName": "My Account", "accountName": "Account1" }, { "accountDisplayName": "WorkPlace.Org", "accountName": "Account2" }] }, "errorText": "" }
Examples
CURL
CURL --insecure -H "apikey:Your_api_key" -H "accept: application/json" "https://transform.alphasoftware.com/transformAPIVersion1.a5svc/Login?username=value_of_username&password=value_of_password&accountName=value_of_accountName"
Node
var https = require('https'); var options = { protocol: "https:", hostname: "transform.alphasoftware.com", path: "/transformAPIVersion1.a5svc/Login?username=value%5fof%5fusername&password=value%5fof%5fpassword&accountName=value%5fof%5faccountName", headers: {apikey: "Your_api_key"} }; https.get(options, (resp) => { let data = ''; resp.on('data', (chunk) => {data += chunk;}); resp.on('end', () => {console.log(data);}); }).on("error", (err) => {console.log("Error: " + err.message);});
Xbasic
dim apikey as c = "Your_api_key" dim postdata as c dim url as c = "/Login?username=value%5fof%5fusername&password=value%5fof%5fpassword&accountName=value%5fof%5faccountName" dim pr as p pr = a5dialogHelper_transformAPIQuery(url,postdata,apikey) if pr.error = .f. then dim result as c result = pr.result else dim errorText as c errorText = pr.errorText end if