> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve OTP

Retrieve an OTP code for a particular agent.

## Parameters

<div className="integrations-table">
  | Parameter | Description                                                                      |
  | --------- | -------------------------------------------------------------------------------- |
  | Agent ID  | The ID of the agent the OTP is for. Can be obtained by the `List Agents` action. |
  | Duration  | The time the OTP will be valid for(15m,1h,6h,24h,7d).                            |
  | Purpose   | The purpose of the OTP code.                                                     |
</div>

## Example Output

```json theme={"dark"}
{
	"error": "Success",
	"response": {
		"otpcode": "12847518751",
		"otpid": "1622521647"
	}
}
```

## Workflow Library Example

[Retrieve Otp with Airlock Digital and Send Results Via Email](https://library.blinkops.com/workflows/retrieve-otp-with-airlock-digital-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/retrieve-otp-with-airlock-digital-and-send-results-via-email/canvas" />
</div>
