Create a device-agent auth code
curl --request POST \
--url https://api.trycomp.ai/v1/device-agent/auth-code \
--header 'Content-Type: application/json' \
--data '
{
"callback_port": 54321,
"state": "9f2c1b7a4d3e5f60718293a4b5c6d7e8"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({callback_port: 54321, state: '9f2c1b7a4d3e5f60718293a4b5c6d7e8'})
};
fetch('https://api.trycomp.ai/v1/device-agent/auth-code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/device-agent/auth-code"
payload = {
"callback_port": 54321,
"state": "9f2c1b7a4d3e5f60718293a4b5c6d7e8"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Device Agent
Create a device-agent auth code | Comp AI API
Create a device-agent auth code in Comp AI. Register employee devices, submit device compliance check-ins, download agent builds, and manage endpoint.
POST
/
v1
/
device-agent
/
auth-code
Create a device-agent auth code
curl --request POST \
--url https://api.trycomp.ai/v1/device-agent/auth-code \
--header 'Content-Type: application/json' \
--data '
{
"callback_port": 54321,
"state": "9f2c1b7a4d3e5f60718293a4b5c6d7e8"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({callback_port: 54321, state: '9f2c1b7a4d3e5f60718293a4b5c6d7e8'})
};
fetch('https://api.trycomp.ai/v1/device-agent/auth-code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/device-agent/auth-code"
payload = {
"callback_port": 54321,
"state": "9f2c1b7a4d3e5f60718293a4b5c6d7e8"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Body
application/json
Response
201 - undefined
Was this page helpful?

