Criar sessão de identidade
curl --request POST \
--url https://api.omni-ward.com/v1/identity/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"processingPurpose": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflowVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
processingPurpose: '<string>'
})
};
fetch('https://api.omni-ward.com/v1/identity/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.omni-ward.com/v1/identity/sessions"
payload = {
"workflowVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"processingPurpose": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omni-ward.com/v1/identity/sessions",
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([
'workflowVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'processingPurpose' => '<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;
}HttpResponse<String> response = Unirest.post("https://api.omni-ward.com/v1/identity/sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"processingPurpose\": \"<string>\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omni-ward.com/v1/identity/sessions"
payload := strings.NewReader("{\n \"workflowVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"processingPurpose\": \"<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))
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"details": "<unknown>"
}
}Sessões do SDK
Criar sessão de identidade
Atalho para criar uma sessão de verificação de identidade. Chame do seu back-end.
POST
/
v1
/
identity
/
sessions
Criar sessão de identidade
curl --request POST \
--url https://api.omni-ward.com/v1/identity/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"processingPurpose": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflowVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
processingPurpose: '<string>'
})
};
fetch('https://api.omni-ward.com/v1/identity/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.omni-ward.com/v1/identity/sessions"
payload = {
"workflowVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"processingPurpose": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omni-ward.com/v1/identity/sessions",
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([
'workflowVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'processingPurpose' => '<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;
}HttpResponse<String> response = Unirest.post("https://api.omni-ward.com/v1/identity/sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"processingPurpose\": \"<string>\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omni-ward.com/v1/identity/sessions"
payload := strings.NewReader("{\n \"workflowVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"processingPurpose\": \"<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))
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"details": "<unknown>"
}
}Authorizations
Chave de API criada no console: ow_test_… (sandbox) ou ow_live_… (produção).
Body
application/json
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Required string length:
5 - 300Available options:
consent, legal_obligation, contract, legitimate_interest, fraud_prevention, credit_protection Maximum string length:
120Maximum string length:
2000Maximum array length:
10Maximum string length:
300Required range:
5 <= x <= 1440Response
Sucesso
