Get Device Authorization
curl --request GET \
--url https://api.korve.dev/v1/agent-auth/device-authorizations/{userCode} \
--cookie korve.session_token=import requests
url = "https://api.korve.dev/v1/agent-auth/device-authorizations/{userCode}"
headers = {"cookie": "korve.session_token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'korve.session_token='}};
fetch('https://api.korve.dev/v1/agent-auth/device-authorizations/{userCode}', 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.korve.dev/v1/agent-auth/device-authorizations/{userCode}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "korve.session_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.korve.dev/v1/agent-auth/device-authorizations/{userCode}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "korve.session_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.korve.dev/v1/agent-auth/device-authorizations/{userCode}")
.header("cookie", "korve.session_token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.korve.dev/v1/agent-auth/device-authorizations/{userCode}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'korve.session_token='
response = http.request(request)
puts response.read_body{
"userCode": "<string>",
"clientId": "korve-cli",
"audience": "cli",
"scopes": [
"<string>"
],
"requestedRole": "member",
"expiresAt": "2023-11-07T05:31:56Z"
}agentAuth
Get Device Authorization
Inspect a pending device authorization by its user code before approving or denying it.
GET
/
v1
/
agent-auth
/
device-authorizations
/
{userCode}
Get Device Authorization
curl --request GET \
--url https://api.korve.dev/v1/agent-auth/device-authorizations/{userCode} \
--cookie korve.session_token=import requests
url = "https://api.korve.dev/v1/agent-auth/device-authorizations/{userCode}"
headers = {"cookie": "korve.session_token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'korve.session_token='}};
fetch('https://api.korve.dev/v1/agent-auth/device-authorizations/{userCode}', 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.korve.dev/v1/agent-auth/device-authorizations/{userCode}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "korve.session_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.korve.dev/v1/agent-auth/device-authorizations/{userCode}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "korve.session_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.korve.dev/v1/agent-auth/device-authorizations/{userCode}")
.header("cookie", "korve.session_token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.korve.dev/v1/agent-auth/device-authorizations/{userCode}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'korve.session_token='
response = http.request(request)
puts response.read_body{
"userCode": "<string>",
"clientId": "korve-cli",
"audience": "cli",
"scopes": [
"<string>"
],
"requestedRole": "member",
"expiresAt": "2023-11-07T05:31:56Z"
}Authorizations
Path Parameters
Human-entered pairing code in XXXX-XXXX form, from an unambiguous alphabet.
Maximum string length:
9Pattern:
^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$Response
Safe approval details; the device code is never returned.
Human-entered pairing code in XXXX-XXXX form, from an unambiguous alphabet.
Maximum string length:
9Pattern:
^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$Available options:
korve-cli, korve-mcp The first-party client surface that may present the resulting token.
Available options:
cli, mcp Exact public API operation ids the grant may call.
Required array length:
1 - 256 elementsMaximum string length:
128Pattern:
^[A-Za-z][A-Za-z0-9]*\.[A-Za-z][A-Za-z0-9]*$Maximum organization role the grant may exercise. Owner grants do not exist.
Available options:
member, admin