Skip to main content
POST
/
api
/
v1
/
auth
/
login
Login (email + password)
curl --request POST \
  --url https://api.flowxi.app/api/v1/auth/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "gbailey@example.net",
  "password": "+-0pBNvYgxwmi/#iw",
  "device_type": "web",
  "device_name": "Chrome (Mac)",
  "device_id": "device-uuid-123",
  "country": "BJ"
}
'
import requests

url = "https://api.flowxi.app/api/v1/auth/login"

payload = {
"email": "gbailey@example.net",
"password": "+-0pBNvYgxwmi/#iw",
"device_type": "web",
"device_name": "Chrome (Mac)",
"device_id": "device-uuid-123",
"country": "BJ"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'gbailey@example.net',
password: '+-0pBNvYgxwmi/#iw',
device_type: 'web',
device_name: 'Chrome (Mac)',
device_id: 'device-uuid-123',
country: 'BJ'
})
};

fetch('https://api.flowxi.app/api/v1/auth/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.flowxi.app/api/v1/auth/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([
'email' => 'gbailey@example.net',
'password' => '+-0pBNvYgxwmi/#iw',
'device_type' => 'web',
'device_name' => 'Chrome (Mac)',
'device_id' => 'device-uuid-123',
'country' => 'BJ'
]),
CURLOPT_HTTPHEADER => [
"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.flowxi.app/api/v1/auth/login"

payload := strings.NewReader("{\n \"email\": \"gbailey@example.net\",\n \"password\": \"+-0pBNvYgxwmi/#iw\",\n \"device_type\": \"web\",\n \"device_name\": \"Chrome (Mac)\",\n \"device_id\": \"device-uuid-123\",\n \"country\": \"BJ\"\n}")

req, _ := http.NewRequest("POST", url, payload)

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.flowxi.app/api/v1/auth/login")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"gbailey@example.net\",\n \"password\": \"+-0pBNvYgxwmi/#iw\",\n \"device_type\": \"web\",\n \"device_name\": \"Chrome (Mac)\",\n \"device_id\": \"device-uuid-123\",\n \"country\": \"BJ\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.flowxi.app/api/v1/auth/login")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"gbailey@example.net\",\n \"password\": \"+-0pBNvYgxwmi/#iw\",\n \"device_type\": \"web\",\n \"device_name\": \"Chrome (Mac)\",\n \"device_id\": \"device-uuid-123\",\n \"country\": \"BJ\"\n}"

response = http.request(request)
puts response.read_body
{
  "code": "LOGIN_SUCCESS",
  "message": "Login successful.",
  "mfa_required": false,
  "access_token": "125|XXXXXXXXXXXXXXXXXXXXXXXX",
  "token_type": "Bearer",
  "account_status": "active",
  "user_id": 123
}

Body

application/json
email
string<email>
required
Example:

"gbailey@example.net"

password
string
required
Example:

"+-0pBNvYgxwmi/#iw"

device_type
string
required
Example:

"web"

device_name
string
required
Example:

"Chrome (Mac)"

device_id
string
required
Example:

"device-uuid-123"

country
string | null
Example:

"BJ"

Response

Login success (token) OR 2FA challenge returned.

code
string
required
Example:

"OK"

message
string
required
Example:

"OK"

mfa_required
boolean
required
Example:

false

access_token
string
required
Example:

"125|XXXXXXXXXXXXXXXXXXXXXXXX"

token_type
string
required
Example:

"Bearer"

account_status
string
required
Example:

"active"

user_id
integer
required
Example:

123