Log in on behalf of users
Since managed users can't log in to Kisi themselves, an organization owner or an admin has to log in on their behalf.
Send a POST
request to the Create login endpoint, following the example below.
Example
curl --request POST \
--url https://api.kisi.io/logins \
--header 'Authorization: KISI-LOGIN <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"login": {
"type": "device",
"device_brand": "string",
"device_model": "string",
"os_name": "string",
"email": "user@example.com",
"expire": "false"
}
}'
type
- all logins created by the Kisi web and mobile apps aredevice
logins. They are logins connected to a device such as your laptop, phone etc. When logging in managed users, onlydevice
logins can be created.device_brand
- the brand of the device this login will be associated todevice_model
- the model of the device this login will be associated toos_name
- the name of the OS of the device this login is created fromexpire
- by default, logins expire after 14 days of inactivity. You can override this by setting theexpire
flag tofalse
when creating a new login.
Response
If your request was successful, you'll receive a 200 OK
response with the login object, the user, and the authentication token associated with this login.
{
"user": {
"id": 0,
"email": "user@example.com",
"name": "user@example.com",
"expire": "false"
},
"secret": "0"
}
secret
- the authentication token used for this login
The login can then be used subsequently to make requests to the Kisi API on behalf of the user.