Login/password

Authentication using login-password pair

POST https://api.directual.com/good/api/v5/auth?appID=?

Query Parameters

NameTypeDescription

appID*

String

API-key

Request Body

NameTypeDescription

provider*

string

rest

username*

string

username

password*

string

password

{
	"result": {
	"token": "8ba4aee8-f509-41d0-9c59-232e828a41a6",
	"username": "test",
	"role": ""
},
	"status": "ok"
}

Get the appID from the API section in your Directual project under API-keys.

The login is the ID of the object from the WebUser data structure, and the password is stored encrypted.

You can use the following cURL command to make a POST request to the Directual API:

{
    "provider": "rest",
    "username": "regressUser@directual.com",
    "password": "regress"
}
curl --location --request POST "https://api.directual.com/good/api/v5/auth?appID=?" \
  --header "Content-Type: application/json" \
  --data "{
\"provider\":\"rest\",
\"username\":\"regressUser@directual.com\",
\"password\":\"regress\"
}"

In the response, the token represents the sessionID of the user, and it is stored in the WebUserSession system data structure. You can use this token for subsequent authenticated requests.

Last updated