curl --request GET \
--url https://api.reflecto.dev/v1/interactions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reflecto.dev/v1/interactions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reflecto.dev/v1/interactions/{id}', 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.reflecto.dev/v1/interactions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reflecto.dev/v1/interactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reflecto.dev/v1/interactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reflecto.dev/v1/interactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b",
"status": "pending",
"expires_at": 1754800000
}Poll an interaction for the phone's answer
Returns the current state of an interaction created via POST /v1/interactions. wait requests a bounded server-side wait: the call holds the connection open and returns early as soon as the phone answers, or once the wait budget is spent — whichever comes first — so a single poll can replace a naive tight loop. Cross-principal reads and unknown ids are indistinguishable — both return 404 rather than confirming an id exists to the wrong owner.
curl --request GET \
--url https://api.reflecto.dev/v1/interactions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reflecto.dev/v1/interactions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reflecto.dev/v1/interactions/{id}', 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.reflecto.dev/v1/interactions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reflecto.dev/v1/interactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reflecto.dev/v1/interactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reflecto.dev/v1/interactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b",
"status": "pending",
"expires_at": 1754800000
}Authorizations
Opaque bearer token created on your paired Android phone. The format is rfk_live_ followed by 32 URL-safe alphanumeric characters (≥160 bits of entropy). Test tokens use the rfk_test_ prefix.
Path Parameters
The interaction id returned by POST /v1/interactions.
"int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b"
Query Parameters
Seconds to hold the connection open waiting for an answer — bounded server-side wait, returns early when answered. Out-of-range values are clamped into [0, 45].
0 <= x <= 4520
Response
Current interaction state.
Interaction id, echoed back.
"int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b"
Current interaction state.
pending, answered, expired "answered"
Unix epoch seconds when the interaction expires (or expired).
1754800000
Index into the original choices array. Present only once status is answered.
0 <= x <= 30
Unix epoch seconds when the phone answered. Present only once status is answered.
1754799500