curl --request POST \
--url https://core.cyberun.cloud/api/v1/desktop/pair/startimport requests
url = "https://core.cyberun.cloud/api/v1/desktop/pair/start"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://core.cyberun.cloud/api/v1/desktop/pair/start', 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/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://core.cyberun.cloud/api/v1/desktop/pair/start"
req, _ := http.NewRequest("POST", url, nil)
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/start")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.cyberun.cloud/api/v1/desktop/pair/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"device_code": "<string>",
"user_code": "AB7K-PNQ3",
"verification_uri": "https://app.cyberun.cloud/desktop/pair?user_code=AB7K-PNQ3",
"expires_in": 300,
"interval": 2
}Start a desktop pairing
Anonymous endpoint. The desktop calls this first, opens the
browser at the returned verification_uri, and starts polling
pollDevicePair with the returned device_code.
The pairing expires after expires_in seconds; restart from
this endpoint if the user takes too long to confirm.
curl --request POST \
--url https://core.cyberun.cloud/api/v1/desktop/pair/startimport requests
url = "https://core.cyberun.cloud/api/v1/desktop/pair/start"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://core.cyberun.cloud/api/v1/desktop/pair/start', 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/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://core.cyberun.cloud/api/v1/desktop/pair/start"
req, _ := http.NewRequest("POST", url, nil)
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/start")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.cyberun.cloud/api/v1/desktop/pair/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"device_code": "<string>",
"user_code": "AB7K-PNQ3",
"verification_uri": "https://app.cyberun.cloud/desktop/pair?user_code=AB7K-PNQ3",
"expires_in": 300,
"interval": 2
}Response
Pairing initialised
Response to POST /desktop/pair/start. Contains everything the
desktop needs to open the browser and start polling for confirm.
Long opaque identifier the desktop uses for polling. Never shown to the user. Treat as a secret — anyone who has it can poll for the issued credential.
Short human-readable code (8 chars, formatted XXXX-XXXX). The user types or sees this in the browser to confirm they are the one pairing.
"AB7K-PNQ3"
Where the user should go in the browser to confirm. The user code is already embedded so the page can pre-fill the confirm form.
"https://app.cyberun.cloud/desktop/pair?user_code=AB7K-PNQ3"
Seconds until both codes expire and pairing must restart.
300
Recommended seconds between Poll calls.
2
