curl --request POST \
--url https://api.exowpee.com/v1/auth/{type}/login \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"password": "<string>",
"company_id": "<string>",
"client_id": "<string>",
"organization_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/auth/{type}/login"
payload = {
"username": "<string>",
"password": "<string>",
"company_id": "<string>",
"client_id": "<string>",
"organization_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
username: '<string>',
password: '<string>',
company_id: '<string>',
client_id: '<string>',
organization_id: '<string>'
})
};
fetch('https://api.exowpee.com/v1/auth/{type}/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/auth/{type}/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'username' => '<string>',
'password' => '<string>',
'company_id' => '<string>',
'client_id' => '<string>',
'organization_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/auth/{type}/login"
payload := strings.NewReader("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"company_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"organization_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/auth/{type}/login")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"company_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"organization_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/auth/{type}/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"company_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"organization_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"auth": {
"access_token": "<string>",
"token_type": "bearer",
"expires_in": 123
},
"user": {
"is_seller": true,
"is_cashier": true,
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"type": "<string>",
"is_active": true,
"email_verified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"current_user_profile_id": "<string>",
"user_profiles": "<array>"
}
}{
"message": "<string>",
"errors": {}
}Sign in
Signs a user or an agent account in (company, client or organization space) and returns a session.
curl --request POST \
--url https://api.exowpee.com/v1/auth/{type}/login \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"password": "<string>",
"company_id": "<string>",
"client_id": "<string>",
"organization_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/auth/{type}/login"
payload = {
"username": "<string>",
"password": "<string>",
"company_id": "<string>",
"client_id": "<string>",
"organization_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
username: '<string>',
password: '<string>',
company_id: '<string>',
client_id: '<string>',
organization_id: '<string>'
})
};
fetch('https://api.exowpee.com/v1/auth/{type}/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/auth/{type}/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'username' => '<string>',
'password' => '<string>',
'company_id' => '<string>',
'client_id' => '<string>',
'organization_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/auth/{type}/login"
payload := strings.NewReader("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"company_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"organization_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/auth/{type}/login")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"company_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"organization_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/auth/{type}/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"company_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"organization_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"auth": {
"access_token": "<string>",
"token_type": "bearer",
"expires_in": 123
},
"user": {
"is_seller": true,
"is_cashier": true,
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"type": "<string>",
"is_active": true,
"email_verified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"current_user_profile_id": "<string>",
"user_profiles": "<array>"
}
}{
"message": "<string>",
"errors": {}
}- No sign-in is needed; the route allows 5 attempts per minute.
- The type in the URL is one of user, agent, client, client_agent, organization or organization_agent; other values do not match a route.
- The username must be an email address or 3 to 100 characters made of letters, digits, underscore, dot and hyphen. It is lower-cased before use.
- company_id is required for type agent account, client_id for client_agent and organization_id for organization_agent; for every other type these fields are refused.
- Wrong credentials and a deactivated account give the same refusal.
- People (user, client, organization) must have a verified email; otherwise a specific unverified-email error is returned.
- Agent accounts are refused at sign-in when the owning company is not active, when the client is not active, or when the organization does not match the agent account’s organization, or when the agent account’s profile no longer exists. Once signed in, people and agent accounts of a company or client that has been deactivated are refused on their next calls.
- Ends the previous session of the same account in that space.
- Issues the token returned in the response.
- For agent accounts, resets the account’s notification refresh read state.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Kind of account signing in: user (person in a company space), agent (company agent account), client (person in a client space), client_agent, organization (person in an organization space) or organization_agent.
Body
Sign-in name. For people (type user, client, organization) it is the email address; for agent accounts it is the agent account's username (3 to 100 characters: letters, digits, _, . or -). It is lower-cased before use.
Password of the account.
For an agent account (type agent): identifier of the company the agent account belongs to. Refused for the other types.
Identifier of the client account (27-character KSUID string) the agent account signs in to. Required when the type is client_agent, refused for every other type.
For an organization agent account (type organization_agent): identifier of the organization the agent account belongs to. Refused for the other types.