Sign in
curl --request POST \
--url https://app.falkordb.cloud/api/signin \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'import requests
url = "https://app.falkordb.cloud/api/signin"
payload = {
"email": "<string>",
"password": "<string>"
}
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: '<string>', password: '<string>'})
};
fetch('https://app.falkordb.cloud/api/signin', 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://app.falkordb.cloud/api/signin",
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' => '<string>',
'password' => '<string>'
]),
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://app.falkordb.cloud/api/signin"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\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://app.falkordb.cloud/api/signin")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.falkordb.cloud/api/signin")
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\": \"<string>\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"omnistrate_token": "<string>",
"omnistrate_refresh_token": "<string>"
}Authentication
Sign in
Sign into FalkorDB Cloud and receive session cookies.
POST
/
api
/
signin
Sign in
curl --request POST \
--url https://app.falkordb.cloud/api/signin \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'import requests
url = "https://app.falkordb.cloud/api/signin"
payload = {
"email": "<string>",
"password": "<string>"
}
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: '<string>', password: '<string>'})
};
fetch('https://app.falkordb.cloud/api/signin', 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://app.falkordb.cloud/api/signin",
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' => '<string>',
'password' => '<string>'
]),
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://app.falkordb.cloud/api/signin"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\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://app.falkordb.cloud/api/signin")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.falkordb.cloud/api/signin")
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\": \"<string>\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"omnistrate_token": "<string>",
"omnistrate_refresh_token": "<string>"
}Signs the user in. Send your FalkorDB Cloud credentials as a JSON body. The response sets two
Both cookies are issued with the following attributes:
Other clients must store the cookies and send them back. With
Because the cookies are scoped to
Error responses are JSON with a single
HttpOnly cookies that authorize every other endpoint.
Body
string
required
The email address of your FalkorDB Cloud account.
string
required
The password of your FalkorDB Cloud account.
{
"email": "you@example.com",
"password": "your-password"
}
Response
Cookies
string
required
Session JWT. Send it on every subsequent request. Expires after 1 hour (
Max-Age=3600).string
required
Refresh token used to obtain a new session token. Expires after 24 hours (
Max-Age=86400).200 OK
Set-Cookie: omnistrate_token=eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9...; Path=/; HttpOnly; SameSite=Lax; Max-Age=3600; Domain=.falkordb.cloud; Secure
Set-Cookie: omnistrate_refresh_token=4610...; Path=/; HttpOnly; SameSite=Lax; Max-Age=86400; Domain=.falkordb.cloud; Secure
| Attribute | Value | Effect |
|---|---|---|
HttpOnly | — | The cookies are not readable from JavaScript. |
Secure | — | The cookies are only sent over HTTPS. |
SameSite | Lax | The cookies are sent on top-level navigations and same-site requests. |
Domain | .falkordb.cloud | The cookies are scoped to FalkorDB Cloud and its subdomains. |
Path | / | The cookies are sent on every path. |
Because the cookies are
HttpOnly, your application cannot read or store them itself. Browser clients should send requests with credentials included; server-side and CLI clients should persist the Set-Cookie values and replay omnistrate_token as a Cookie header.Sending the cookie
Browsers attach the cookies automatically as long as the request includes credentials:await fetch("/api/instances", { credentials: "include" });
curl, use a cookie jar:
curl -c cookies.txt -X POST \
https://app.falkordb.cloud/api/signin \
-H "Content-Type: application/json" \
-d '{"email": "'"$FALKORDB_EMAIL"'", "password": "'"$FALKORDB_PASSWORD"'"}'
.falkordb.cloud, curl does not replay them to https://api.omnistrate.cloud. Read omnistrate_token out of the cookie jar and send it as an explicit Cookie header instead:
TOKEN=$(awk '$6 == "omnistrate_token" { print $7 }' cookies.txt)
curl -H "Cookie: omnistrate_token=$TOKEN" https://api.omnistrate.cloud/...
Session lifetime
The session token is valid for 1 hour. After it expires, use the refresh token to obtain a new session, or sign in again. The refresh token is valid for 24 hours; once it expires, the user must sign in with their credentials.Errors
| Status | Description |
|---|---|
| 400 | The body is malformed, or the email and password do not match an account. |
| 500 | The server failed to complete the sign-in. |
message field:
{
"message": "Invalid request: wrong user email or password"
}
Was this page helpful?