API reference
Start a device login
Start a device login, for a machine with no browser. Show the person verification_uri_complete and user_code, then poll POST /auth/token every interval seconds. No key needed. Does not use shortlist credits.
POST
/
auth
/
device
Start a device login
curl --request POST \
--url https://api.revcenter.ai/v1/auth/device \
--header 'Content-Type: application/json' \
--data '
{
"client_name": "revcenter CLI on laptop"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_name: 'revcenter CLI on laptop'})
};
fetch('https://api.revcenter.ai/v1/auth/device', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revcenter.ai/v1/auth/device"
payload = { "client_name": "revcenter CLI on laptop" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"device_code": "rvcd_kq3...",
"user_code": "BCDF-GHJK",
"verification_uri": "https://app.revcenter.ai/oauth/device",
"verification_uri_complete": "https://app.revcenter.ai/oauth/device/BCDF-GHJK",
"expires_in": 600,
"interval": 5
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}⌘I
Start a device login
curl --request POST \
--url https://api.revcenter.ai/v1/auth/device \
--header 'Content-Type: application/json' \
--data '
{
"client_name": "revcenter CLI on laptop"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_name: 'revcenter CLI on laptop'})
};
fetch('https://api.revcenter.ai/v1/auth/device', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revcenter.ai/v1/auth/device"
payload = { "client_name": "revcenter CLI on laptop" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"device_code": "rvcd_kq3...",
"user_code": "BCDF-GHJK",
"verification_uri": "https://app.revcenter.ai/oauth/device",
"verification_uri_complete": "https://app.revcenter.ai/oauth/device/BCDF-GHJK",
"expires_in": 600,
"interval": 5
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}