Check a link
curl --request GET \
--url https://api.circuit.org/partner/v0.1/links/{link_id}import requests
url = "https://api.circuit.org/partner/v0.1/links/{link_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.circuit.org/partner/v0.1/links/{link_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.circuit.org/partner/v0.1/links/{link_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.circuit.org/partner/v0.1/links/{link_id}"
req, _ := http.NewRequest("GET", url, nil)
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.circuit.org/partner/v0.1/links/{link_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.circuit.org/partner/v0.1/links/{link_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"status": "waiting",
"expires_at": "2023-11-07T05:31:56Z",
"permit": "<string>"
}{
"error": "<string>",
"code": "<string>"
}API Reference
Check a link
Returns the link’s status. Call it every 2 seconds after opening the link. Once status is approved, permit holds the user’s permit encrypted to your key; decrypt it and store it like an access token. Needs no permit.
GET
/
partner
/
v0.1
/
links
/
{link_id}
Check a link
curl --request GET \
--url https://api.circuit.org/partner/v0.1/links/{link_id}import requests
url = "https://api.circuit.org/partner/v0.1/links/{link_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.circuit.org/partner/v0.1/links/{link_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.circuit.org/partner/v0.1/links/{link_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.circuit.org/partner/v0.1/links/{link_id}"
req, _ := http.NewRequest("GET", url, nil)
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.circuit.org/partner/v0.1/links/{link_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.circuit.org/partner/v0.1/links/{link_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"status": "waiting",
"expires_at": "2023-11-07T05:31:56Z",
"permit": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Path Parameters
Example:
"lnk_9c9915b3-1f0e-4b7a-8d2c-3e5f6a7b8c9d"
Response
OK
A page where the user approves your app. Once they do, it holds their permit.
The link's id, starting with lnk_.
Open this in a real browser so the user can sign in, pick wallets and approve.
The user has not approved yet.
Allowed value:
"waiting"When the link expires, five minutes after it was created.
The user's permit, encrypted to your public key, once status is approved. It is base64url of a 32-byte ephemeral X25519 public key, a 12-byte IV and the AES-256-GCM ciphertext. Null until then.