Exchange an auth code for device credentials
curl --request POST \
--url https://api.trycomp.ai/v1/device-agent/exchange-code \
--header 'Content-Type: application/json' \
--data '
{
"code": "3f8c1a9b2d4e6f70819a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f70"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({code: '3f8c1a9b2d4e6f70819a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f70'})
};
fetch('https://api.trycomp.ai/v1/device-agent/exchange-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/exchange-code"
payload = { "code": "3f8c1a9b2d4e6f70819a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f70" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Device Agent
Exchange an auth code for device credentials | Comp AI API
Exchange an auth code for device credentials in Comp AI. Register employee devices, submit device compliance check-ins, download agent builds, and manage.
POST
/
v1
/
device-agent
/
exchange-code
Exchange an auth code for device credentials
curl --request POST \
--url https://api.trycomp.ai/v1/device-agent/exchange-code \
--header 'Content-Type: application/json' \
--data '
{
"code": "3f8c1a9b2d4e6f70819a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f70"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({code: '3f8c1a9b2d4e6f70819a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f70'})
};
fetch('https://api.trycomp.ai/v1/device-agent/exchange-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/exchange-code"
payload = { "code": "3f8c1a9b2d4e6f70819a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f70" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Body
application/json
Single-use authorization code issued to the device agent, exchanged for a session token
Example:
"3f8c1a9b2d4e6f70819a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f70"
Response
201 - undefined
Was this page helpful?

