curl
curl -X POST https://my_sql_node.com/v1/sso_device_grant_verify \
-H "Content-Type: application/json" \
-d '{
"user_code": "BCDFGHJK",
"timeout": 60,
"database": "retail_analytics"
}'import requests
url = "https://{sql_node}/v1/sso_device_grant_verify"
payload = {
"user_code": "<string>",
"database": "<string>",
"timeout": "<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({user_code: '<string>', database: '<string>', timeout: '<string>'})
};
fetch('https://{sql_node}/v1/sso_device_grant_verify', 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://{sql_node}/v1/sso_device_grant_verify",
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>',
'database' => '<string>',
'timeout' => '<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://{sql_node}/v1/sso_device_grant_verify"
payload := strings.NewReader("{\n \"user_code\": \"<string>\",\n \"database\": \"<string>\",\n \"timeout\": \"<string>\"\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://{sql_node}/v1/sso_device_grant_verify")
.header("Content-Type", "application/json")
.body("{\n \"user_code\": \"<string>\",\n \"database\": \"<string>\",\n \"timeout\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{sql_node}/v1/sso_device_grant_verify")
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 \"user_code\": \"<string>\",\n \"database\": \"<string>\",\n \"timeout\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJqZG9lIiwiZGIiOiJyZXRhaWxfYW5hbHl0aWNzIiwiZXhwIjoxNjM1NDYxNzEyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"username": "jdoe",
"database": "retail_analytics",
"status": {
"reason": "Authentication successful",
"sql_state": "00000",
"vendor_code": 0
}
}Ocient HTTP Query API
sso_device_grant_verify
Verify a previous device grant request and return an authorization token. After initiating a device grant process with the sso_device_grant endpoint, use this endpoint to check if the user has completed the verification process. If the verification is successful, the endpoint returns an authorization token that you can use for subsequent API calls. You can call this endpoint multiple times until one of these outcomes: The user completes the verification (returns 200 OK with a token). The timeout is reached (returns error). The verification is canceled (returns error).
POST
/
v1
/
sso_device_grant_verify
curl
curl -X POST https://my_sql_node.com/v1/sso_device_grant_verify \
-H "Content-Type: application/json" \
-d '{
"user_code": "BCDFGHJK",
"timeout": 60,
"database": "retail_analytics"
}'import requests
url = "https://{sql_node}/v1/sso_device_grant_verify"
payload = {
"user_code": "<string>",
"database": "<string>",
"timeout": "<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({user_code: '<string>', database: '<string>', timeout: '<string>'})
};
fetch('https://{sql_node}/v1/sso_device_grant_verify', 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://{sql_node}/v1/sso_device_grant_verify",
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>',
'database' => '<string>',
'timeout' => '<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://{sql_node}/v1/sso_device_grant_verify"
payload := strings.NewReader("{\n \"user_code\": \"<string>\",\n \"database\": \"<string>\",\n \"timeout\": \"<string>\"\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://{sql_node}/v1/sso_device_grant_verify")
.header("Content-Type", "application/json")
.body("{\n \"user_code\": \"<string>\",\n \"database\": \"<string>\",\n \"timeout\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{sql_node}/v1/sso_device_grant_verify")
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 \"user_code\": \"<string>\",\n \"database\": \"<string>\",\n \"timeout\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJqZG9lIiwiZGIiOiJyZXRhaWxfYW5hbHl0aWNzIiwiZXhwIjoxNjM1NDYxNzEyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"username": "jdoe",
"database": "retail_analytics",
"status": {
"reason": "Authentication successful",
"sql_state": "00000",
"vendor_code": 0
}
}Body
application/json
Last modified on September 9, 2026
Was this page helpful?

