Start CLI device authorization
curl --request POST \
--url https://api.video2ctx.dev/api/auth/device/code \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "video2ctx-cli"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_id: 'video2ctx-cli'})
};
fetch('https://api.video2ctx.dev/api/auth/device/code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.video2ctx.dev/api/auth/device/code"
payload = { "client_id": "video2ctx-cli" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"user_code": "<string>",
"verification_uri": "<string>",
"verification_uri_complete": "<string>",
"expires_in": 2,
"interval": 2
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}Authentication
Start CLI device authorization
Issues a short-lived device code and a user code for the registered video2ctx CLI client.
POST
/
api
/
auth
/
device
/
code
Start CLI device authorization
curl --request POST \
--url https://api.video2ctx.dev/api/auth/device/code \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "video2ctx-cli"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_id: 'video2ctx-cli'})
};
fetch('https://api.video2ctx.dev/api/auth/device/code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.video2ctx.dev/api/auth/device/code"
payload = { "client_id": "video2ctx-cli" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"user_code": "<string>",
"verification_uri": "<string>",
"verification_uri_complete": "<string>",
"expires_in": 2,
"interval": 2
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}Body
application/json