curl --request POST \
--url https://sandbox.circularo.com/api/v1/login/unlock \
--header 'Content-Type: application/json' \
--data '
{
"factors": [
{
"factor": "sms",
"password": "123456"
}
]
}
'import requests
url = "https://sandbox.circularo.com/api/v1/login/unlock"
payload = { "factors": [
{
"factor": "sms",
"password": "123456"
}
] }
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({factors: [{factor: 'sms', password: '123456'}]})
};
fetch('https://sandbox.circularo.com/api/v1/login/unlock', 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://sandbox.circularo.com/api/v1/login/unlock",
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([
'factors' => [
[
'factor' => 'sms',
'password' => '123456'
]
]
]),
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://sandbox.circularo.com/api/v1/login/unlock"
payload := strings.NewReader("{\n \"factors\": [\n {\n \"factor\": \"sms\",\n \"password\": \"123456\"\n }\n ]\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://sandbox.circularo.com/api/v1/login/unlock")
.header("Content-Type", "application/json")
.body("{\n \"factors\": [\n {\n \"factor\": \"sms\",\n \"password\": \"123456\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/login/unlock")
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 \"factors\": [\n {\n \"factor\": \"sms\",\n \"password\": \"123456\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"factors": [
{
"address": "*****89",
"attemptsLeft": 2,
"factor": "sms",
"unlocked": false,
"validUntil": "2023-11-07T05:31:56Z"
}
],
"isUnlocked": false
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Verify second factors and unlock a token
POST /login/unlock
Answers the second factors a locked token is waiting for. Send the token signing in handed back together with a code for each factor you are answering; the token unlocks once none are left outstanding, and only then can it be used anywhere else.
A wrong code is not an error - the call succeeds and reports that factor as still locked, with one fewer attempt left. Once a factor runs out of attempts, or its code has expired, no code will be accepted for it any more: ask for a new one with POST /login/resendAuthentications, or step around the factors altogether with POST /login/recovery. A factor whose code comes from an authenticator app is neither timed nor limited this way and cannot be resent. Whatever the factor, too many wrong codes for it - on any of the person’s tokens and from any address - lock the person out of answering it for a while, as wrong passwords do; a call answering such a factor is then refused as a whole.
No authorization: No authorization is required to call this endpoint.
curl --request POST \
--url https://sandbox.circularo.com/api/v1/login/unlock \
--header 'Content-Type: application/json' \
--data '
{
"factors": [
{
"factor": "sms",
"password": "123456"
}
]
}
'import requests
url = "https://sandbox.circularo.com/api/v1/login/unlock"
payload = { "factors": [
{
"factor": "sms",
"password": "123456"
}
] }
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({factors: [{factor: 'sms', password: '123456'}]})
};
fetch('https://sandbox.circularo.com/api/v1/login/unlock', 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://sandbox.circularo.com/api/v1/login/unlock",
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([
'factors' => [
[
'factor' => 'sms',
'password' => '123456'
]
]
]),
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://sandbox.circularo.com/api/v1/login/unlock"
payload := strings.NewReader("{\n \"factors\": [\n {\n \"factor\": \"sms\",\n \"password\": \"123456\"\n }\n ]\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://sandbox.circularo.com/api/v1/login/unlock")
.header("Content-Type", "application/json")
.body("{\n \"factors\": [\n {\n \"factor\": \"sms\",\n \"password\": \"123456\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/login/unlock")
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 \"factors\": [\n {\n \"factor\": \"sms\",\n \"password\": \"123456\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"factors": [
{
"address": "*****89",
"attemptsLeft": 2,
"factor": "sms",
"unlocked": false,
"validUntil": "2023-11-07T05:31:56Z"
}
],
"isUnlocked": false
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Query Parameters
Body
Response
Reports whether the token is now unlocked, and how each factor that was answered ended up. Answering wrongly is reported here rather than as a failure.