Create Device Authorization
curl --request POST \
--url https://api.korve.dev/v1/agent-auth/device-authorizations \
--header 'Content-Type: application/json' \
--data '
{
"scopes": [
"<string>"
]
}
'import requests
url = "https://api.korve.dev/v1/agent-auth/device-authorizations"
payload = { "scopes": ["<string>"] }
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({scopes: ['<string>']})
};
fetch('https://api.korve.dev/v1/agent-auth/device-authorizations', 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",
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([
'scopes' => [
'<string>'
]
]),
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://api.korve.dev/v1/agent-auth/device-authorizations"
payload := strings.NewReader("{\n \"scopes\": [\n \"<string>\"\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://api.korve.dev/v1/agent-auth/device-authorizations")
.header("Content-Type", "application/json")
.body("{\n \"scopes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.korve.dev/v1/agent-auth/device-authorizations")
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 \"scopes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deviceCode": "<string>",
"userCode": "<string>",
"verificationUri": "<string>",
"verificationUriComplete": "<string>",
"expiresIn": 2,
"interval": 2
}agentAuth
Create Device Authorization
Begin a device authorization flow for a browserless or sandboxed client. A human approves the short pairing code on the dashboard while the client polls the token endpoint.
POST
/
v1
/
agent-auth
/
device-authorizations
Create Device Authorization
curl --request POST \
--url https://api.korve.dev/v1/agent-auth/device-authorizations \
--header 'Content-Type: application/json' \
--data '
{
"scopes": [
"<string>"
]
}
'import requests
url = "https://api.korve.dev/v1/agent-auth/device-authorizations"
payload = { "scopes": ["<string>"] }
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({scopes: ['<string>']})
};
fetch('https://api.korve.dev/v1/agent-auth/device-authorizations', 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",
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([
'scopes' => [
'<string>'
]
]),
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://api.korve.dev/v1/agent-auth/device-authorizations"
payload := strings.NewReader("{\n \"scopes\": [\n \"<string>\"\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://api.korve.dev/v1/agent-auth/device-authorizations")
.header("Content-Type", "application/json")
.body("{\n \"scopes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.korve.dev/v1/agent-auth/device-authorizations")
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 \"scopes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deviceCode": "<string>",
"userCode": "<string>",
"verificationUri": "<string>",
"verificationUriComplete": "<string>",
"expiresIn": 2,
"interval": 2
}Body
application/json
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 Response
Device authorization created. Show the user code, then poll the token endpoint with the device code.
Client-held polling secret; never shown to the approving user.
Human-entered pairing code in XXXX-XXXX form, from an unambiguous alphabet.
Maximum string length:
9Pattern:
^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$The verification page with the user code pre-filled.
Required range:
x >= 1Minimum seconds between token polls.
Required range:
x >= 1