cURL
curl -X POST https://apx.didit.me/auth/v2/programmatic/login/ \
-H "Content-Type: application/json" \
-d '{
"email": "you@yourdomain.com",
"password": "MyStr0ng!Pass"
}'import requests
resp = requests.post(
"https://apx.didit.me/auth/v2/programmatic/login/",
json={
"email": "you@yourdomain.com",
"password": "MyStr0ng!Pass",
},
timeout=10,
)
resp.raise_for_status()
tokens = resp.json()
access_token = tokens["access_token"]
# Use against the Account Management endpoints on this host
orgs = requests.get(
"https://apx.didit.me/auth/v2/organizations/me/",
headers={"Authorization": f"Bearer {access_token}"},
timeout=10,
).json()const resp = await fetch(
"https://apx.didit.me/auth/v2/programmatic/login/",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
email: "you@yourdomain.com",
password: "MyStr0ng!Pass",
}),
},
);
if (!resp.ok) throw new Error(`Login failed: ${resp.status}`);
const { access_token } = await resp.json();
// Use against the Account Management endpoints on this host
const orgs = await fetch(
"https://apx.didit.me/auth/v2/organizations/me/",
{ headers: { Authorization: `Bearer ${access_token}` } },
).then((r) => r.json());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apx.didit.me/auth/v2/programmatic/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' => 'you@yourdomain.com',
'password' => 'MyStr0ng!Pass'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://apx.didit.me/auth/v2/programmatic/login/"
payload := strings.NewReader("{\n \"email\": \"you@yourdomain.com\",\n \"password\": \"MyStr0ng!Pass\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://apx.didit.me/auth/v2/programmatic/login/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"you@yourdomain.com\",\n \"password\": \"MyStr0ng!Pass\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apx.didit.me/auth/v2/programmatic/login/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"you@yourdomain.com\",\n \"password\": \"MyStr0ng!Pass\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 86400,
"message": "Login successful"
}Auth API (Programmatic)
Programmatic Login
Authenticate any verified email/password Didit account and receive an RS256 JWT pair (default lifetime 86400s). Console-created email/password accounts can use this endpoint; OAuth-only console accounts must set a password first.
POST
/
programmatic
/
login
/
cURL
curl -X POST https://apx.didit.me/auth/v2/programmatic/login/ \
-H "Content-Type: application/json" \
-d '{
"email": "you@yourdomain.com",
"password": "MyStr0ng!Pass"
}'import requests
resp = requests.post(
"https://apx.didit.me/auth/v2/programmatic/login/",
json={
"email": "you@yourdomain.com",
"password": "MyStr0ng!Pass",
},
timeout=10,
)
resp.raise_for_status()
tokens = resp.json()
access_token = tokens["access_token"]
# Use against the Account Management endpoints on this host
orgs = requests.get(
"https://apx.didit.me/auth/v2/organizations/me/",
headers={"Authorization": f"Bearer {access_token}"},
timeout=10,
).json()const resp = await fetch(
"https://apx.didit.me/auth/v2/programmatic/login/",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
email: "you@yourdomain.com",
password: "MyStr0ng!Pass",
}),
},
);
if (!resp.ok) throw new Error(`Login failed: ${resp.status}`);
const { access_token } = await resp.json();
// Use against the Account Management endpoints on this host
const orgs = await fetch(
"https://apx.didit.me/auth/v2/organizations/me/",
{ headers: { Authorization: `Bearer ${access_token}` } },
).then((r) => r.json());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apx.didit.me/auth/v2/programmatic/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' => 'you@yourdomain.com',
'password' => 'MyStr0ng!Pass'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://apx.didit.me/auth/v2/programmatic/login/"
payload := strings.NewReader("{\n \"email\": \"you@yourdomain.com\",\n \"password\": \"MyStr0ng!Pass\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://apx.didit.me/auth/v2/programmatic/login/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"you@yourdomain.com\",\n \"password\": \"MyStr0ng!Pass\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apx.didit.me/auth/v2/programmatic/login/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"you@yourdomain.com\",\n \"password\": \"MyStr0ng!Pass\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 86400,
"message": "Login successful"
}Authorizations
Body
application/json
Response
Login successful. Returns a fresh JWT pair. Use the access_token as Authorization: Bearer <token> against /organizations/me/... to look up the org_id, app_id, and api_key.
⌘I