What an approval page shows for a user code
curl --request GET \
--url https://api.zinc.com/device/codes/{user_code} \
--header 'Authorization: <api-key>'import requests
url = "https://api.zinc.com/device/codes/{user_code}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zinc.com/device/codes/{user_code}', 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.zinc.com/device/codes/{user_code}",
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: <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"
"net/http"
"io"
)
func main() {
url := "https://api.zinc.com/device/codes/{user_code}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.zinc.com/device/codes/{user_code}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zinc.com/device/codes/{user_code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"user_code": "<string>",
"name": "<string>",
"source": "<string>",
"sandbox_attached": true,
"status": "<string>",
"starter_credit_cents": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Device Approval
Describe a Device Code
Read what the approval page shows for a user code: who is asking, from what runtime, and whether it is still pending.
GET
/
device
/
codes
/
{user_code}
What an approval page shows for a user code
curl --request GET \
--url https://api.zinc.com/device/codes/{user_code} \
--header 'Authorization: <api-key>'import requests
url = "https://api.zinc.com/device/codes/{user_code}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zinc.com/device/codes/{user_code}', 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.zinc.com/device/codes/{user_code}",
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: <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"
"net/http"
"io"
)
func main() {
url := "https://api.zinc.com/device/codes/{user_code}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.zinc.com/device/codes/{user_code}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zinc.com/device/codes/{user_code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"user_code": "<string>",
"name": "<string>",
"source": "<string>",
"sandbox_attached": true,
"status": "<string>",
"starter_credit_cents": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}What the approval screen renders for a
user_code. Public on purpose — the page needs it before the human has signed in, and it holds only what the agent said about itself.
curl https://api.zinc.com/device/codes/XZSW-99RL
| Field | Meaning |
|---|---|
name | What the agent called itself when it started the code. |
source | Runtime guessed from the requesting User-Agent (claude-code, codex, curl, …). |
sandbox_attached | Approval will also claim the agent’s sandbox into the approving account. |
starter_credit_cents | Wallet credit approval would add, or null when none applies. |
status | pending, approved, or denied. |
This is for rendering an approval screen, not for polling. An agent waiting on a decision should poll
POST /device/token at its interval instead.Authorizations
Zinc API key (Bearer zn_...)
Path Parameters
Response
Successful Response
What the approval page shows before the human decides. Public: it holds only what the agent chose to say about itself.
Runtime guessed from the requesting User-Agent (claude-code, codex, curl, …).
Approval will also claim the agent's sandbox into the approving account.
pending | approved | denied
Wallet credit approval would add, when the attached sandbox has placed an order and the account has not had one; null otherwise.

