curl --request POST \
--url https://core.cyberun.cloud/api/v1/desktop/pair/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Team-ID: <x-team-id>' \
--data '
{
"user_code": "<string>",
"device_name": "Mac Studio - YuHung"
}
'import requests
url = "https://core.cyberun.cloud/api/v1/desktop/pair/confirm"
payload = {
"user_code": "<string>",
"device_name": "Mac Studio - YuHung"
}
headers = {
"X-Team-ID": "<x-team-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Team-ID': '<x-team-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({user_code: '<string>', device_name: 'Mac Studio - YuHung'})
};
fetch('https://core.cyberun.cloud/api/v1/desktop/pair/confirm', 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://core.cyberun.cloud/api/v1/desktop/pair/confirm",
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([
'user_code' => '<string>',
'device_name' => 'Mac Studio - YuHung'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Team-ID: <x-team-id>"
],
]);
$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://core.cyberun.cloud/api/v1/desktop/pair/confirm"
payload := strings.NewReader("{\n \"user_code\": \"<string>\",\n \"device_name\": \"Mac Studio - YuHung\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Team-ID", "<x-team-id>")
req.Header.Add("Authorization", "Bearer <token>")
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://core.cyberun.cloud/api/v1/desktop/pair/confirm")
.header("X-Team-ID", "<x-team-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_code\": \"<string>\",\n \"device_name\": \"Mac Studio - YuHung\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.cyberun.cloud/api/v1/desktop/pair/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Team-ID"] = '<x-team-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_code\": \"<string>\",\n \"device_name\": \"Mac Studio - YuHung\"\n}"
response = http.request(request)
puts response.read_body{
"error_message": "resource not found"
}{
"error_message": "resource not found"
}{
"error_message": "resource not found"
}Confirm a desktop pairing
Called by the Cyberun dashboard after the user reviews the consent screen and clicks confirm. Requires an authenticated user session (JWT) — the credential is issued to that user inside the X-Team-ID team.
On success the desktop’s next Poll will return the dk- credential. Confirm itself returns 204 with no body; the raw key is never shown to the confirming browser.
curl --request POST \
--url https://core.cyberun.cloud/api/v1/desktop/pair/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Team-ID: <x-team-id>' \
--data '
{
"user_code": "<string>",
"device_name": "Mac Studio - YuHung"
}
'import requests
url = "https://core.cyberun.cloud/api/v1/desktop/pair/confirm"
payload = {
"user_code": "<string>",
"device_name": "Mac Studio - YuHung"
}
headers = {
"X-Team-ID": "<x-team-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Team-ID': '<x-team-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({user_code: '<string>', device_name: 'Mac Studio - YuHung'})
};
fetch('https://core.cyberun.cloud/api/v1/desktop/pair/confirm', 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://core.cyberun.cloud/api/v1/desktop/pair/confirm",
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([
'user_code' => '<string>',
'device_name' => 'Mac Studio - YuHung'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Team-ID: <x-team-id>"
],
]);
$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://core.cyberun.cloud/api/v1/desktop/pair/confirm"
payload := strings.NewReader("{\n \"user_code\": \"<string>\",\n \"device_name\": \"Mac Studio - YuHung\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Team-ID", "<x-team-id>")
req.Header.Add("Authorization", "Bearer <token>")
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://core.cyberun.cloud/api/v1/desktop/pair/confirm")
.header("X-Team-ID", "<x-team-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_code\": \"<string>\",\n \"device_name\": \"Mac Studio - YuHung\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.cyberun.cloud/api/v1/desktop/pair/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Team-ID"] = '<x-team-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_code\": \"<string>\",\n \"device_name\": \"Mac Studio - YuHung\"\n}"
response = http.request(request)
puts response.read_body{
"error_message": "resource not found"
}{
"error_message": "resource not found"
}{
"error_message": "resource not found"
}Authorizations
User session JWT (Bearer ). Must be paired with the X-Team-ID
request header on team-scoped endpoints so the server knows which
team's resources to operate on.
Headers
UUID of the team to scope the request to. Required on all team-scoped JWT endpoints because a user may belong to multiple teams.
"019abc12-4567-7890-abcd-ef1234567891"
Body
Response
Pairing confirmed; the desktop's next poll will receive the credential.
