credentials

Poll for credential delivery (agent)

The agent polls with its device_code to check whether the operator has approved or denied the request. When status is approved, the credential field contains the one-time-delivered secret — it is deleted from AgentLair storage immediately after this response. Recommended interval: 5 seconds (as returned in the request response).

post/v1/credentials/poll

Request

  • Base URL: https://agentlair.dev
  • URL: https://agentlair.dev/v1/credentials/poll
  • Auth: HTTP bearer

Request body

device_codestring required

The device code returned by POST /v1/credentials/request

Example request

{
  "device_code": "dc_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345678901"
}

Response

Poll result

status'pending' | 'approved' | 'denied' | 'expired' | 'slow_down'

Current status of the credential request

credentialstring

The credential value. Present only when status is approved. One-time delivery — not recoverable after this response.

intervalinteger

Present only when status is slow_down. New recommended polling interval in seconds.

Example response

{
  "credential": "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "interval": 30
}

Changes

No recorded changes to this operation across all 1 revision of this API.