Skip to main content
GET
/
agents
/
device-codes
/
{code}
/
status
cURL
curl --request GET \
  --url https://api.lightspark.com/grid/2025-10-13/agents/device-codes/{code}/status \
  --header 'Authorization: Basic <encoded-value>'
import LightsparkGrid from '@lightsparkdev/grid';

const client = new LightsparkGrid({
username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});

const agentDeviceCodeStatusResponse = await client.agents.deviceCodes.getStatus('code');

console.log(agentDeviceCodeStatusResponse.code);
package com.lightspark.grid.example

import com.lightspark.grid.client.LightsparkGridClient
import com.lightspark.grid.client.okhttp.LightsparkGridOkHttpClient
import com.lightspark.grid.models.agents.AgentDeviceCodeStatusResponse
import com.lightspark.grid.models.agents.devicecodes.DeviceCodeGetStatusParams

fun main() {
val client: LightsparkGridClient = LightsparkGridOkHttpClient.fromEnv()

val agentDeviceCodeStatusResponse: AgentDeviceCodeStatusResponse = client.agents().deviceCodes().getStatus("code")
}
{
  "code": "GRID-AGENT-X7K9-M2P4",
  "redeemed": false
}
{
"status": 401,
"message": "<string>",
"details": {}
}
{
"status": 404,
"message": "<string>",
"details": {}
}
{
"status": 500,
"message": "<string>",
"details": {}
}

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Path Parameters

code
string
required

The device code to check

Response

Successful operation

code
string
required

The device code.

Example:

"GRID-AGENT-X7K9-M2P4"

redeemed
boolean
required

Whether this device code has been redeemed.

Example:

false