Start a device sign-in
curl --request POST \
--url https://api.qumo-deploy.com/v1/auth/device/codeimport requests
url = "https://api.qumo-deploy.com/v1/auth/device/code"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.qumo-deploy.com/v1/auth/device/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.qumo-deploy.com/v1/auth/device/code",
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://api.qumo-deploy.com/v1/auth/device/code"
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://api.qumo-deploy.com/v1/auth/device/code")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qumo-deploy.com/v1/auth/device/code")
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": "Xq7vR2mK9pL4tN8wZ3cY6bH1jF5sD0aG2eU7iO4kM9n",
"user_code": "WDJB-MJHT",
"verification_uri": "https://console.qumo-deploy.com/device",
"expires_in": 900,
"interval": 5
}{
"error": "organization_id is required"
}Device flow
Start a device sign-in
Starts an OAuth 2.0 device authorization (RFC 8628). Show the user
user_code and verification_uri, then poll
POST /v1/auth/device/token with device_code every interval
seconds until the user approves. The codes expire after 15 minutes.
Needs no authentication and takes no request body.
POST
/
v1
/
auth
/
device
/
code
Start a device sign-in
curl --request POST \
--url https://api.qumo-deploy.com/v1/auth/device/codeimport requests
url = "https://api.qumo-deploy.com/v1/auth/device/code"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.qumo-deploy.com/v1/auth/device/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.qumo-deploy.com/v1/auth/device/code",
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://api.qumo-deploy.com/v1/auth/device/code"
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://api.qumo-deploy.com/v1/auth/device/code")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qumo-deploy.com/v1/auth/device/code")
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": "Xq7vR2mK9pL4tN8wZ3cY6bH1jF5sD0aG2eU7iO4kM9n",
"user_code": "WDJB-MJHT",
"verification_uri": "https://console.qumo-deploy.com/device",
"expires_in": 900,
"interval": 5
}{
"error": "organization_id is required"
}Response
A new device code.
The code to poll with. Keep it private.
Example:
"Xq7vR2mK9pL4tN8wZ3cY6bH1jF5sD0aG2eU7iO4kM9n"
The code the user enters at verification_uri.
Pattern:
^[A-Z2-9]{4}-[A-Z2-9]{4}$Example:
"WDJB-MJHT"
The console page where the user approves the sign-in.
Example:
"https://console.qumo-deploy.com/device"
Seconds until the codes expire.
Example:
900
Minimum seconds between polls.
Example:
5