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

# Introduction

> Hypersender OTP API - Send verification codes via WhatsApp & SMS

Send one-time passwords (OTPs) and magic links to your users via WhatsApp or SMS. Simple as that.

## Quick Demo

<Tip>
  **Learn how to use Hypersender OTP API with Postman:** [Send OTP Guide](/v2/api-reference/otp/how-to-use-otp-api-in-postman) | [Generate OTP Link Guide](/v2/api-reference/otp/generate-whatsapp-otp-link-with-hypersender-api)
</Tip>

## How It Works

<Steps>
  <Step title="Request Code" icon="key">
    Generate a verification code and send it to your user via **WhatsApp or SMS**.

    You can customize the code length, character type (numbers, letters, or both), and expiration time. Works with WhatsApp chat IDs and phone numbers for SMS.
  </Step>

  <Step title="Validate Code" icon="circle-check">
    When your user enters the code, hit this endpoint to check if it's correct.

    Works for both **WhatsApp and SMS**. We handle expiration checks and make sure each code only works once.
  </Step>

  <Step title="Generate Link (WhatsApp only)" icon="link">
    Create a magic link for passwordless auth. User taps the link, you get a callback — no code entry needed.

    <Note>
      This endpoint is **WhatsApp only** since it sends an interactive button message.
    </Note>
  </Step>
</Steps>

## Quick Setup

**Base URL:**

```
https://app.hypersender.com/api/otp/v2
```

**Auth:** Bearer token in the header

```bash theme={null}
Authorization: Bearer YOUR_API_TOKEN
```

**Endpoints:**

```
/{instance}/request-code
/{instance}/validate-code
/{instance}/generate-link
```

## Endpoints

<CardGroup cols={3}>
  <Card title="Request Code" icon="key" href="/v2/api-reference/otp/request-code">
    Send a verification code
  </Card>

  <Card title="Validate Code" icon="circle-check" href="/v2/api-reference/otp/validate-code">
    Verify user's code
  </Card>

  <Card title="Generate Link" icon="link" href="/v2/api-reference/otp/generate-link">
    Send a magic link
  </Card>
</CardGroup>

## Good to Know

* Codes expire automatically (you set the TTL)
* Each code works only once
* Rate limiting is built-in
* Works with both WhatsApp chat IDs and phone numbers for SMS

<Warning>
  Keep your API keys secret. Don't put them in client-side code.
</Warning>

## Postman Collection

<a href="/v2/api-reference/otp/otp-collection.json" download>
  <Card title="Download OTP Collection" icon="book-open">
    Get the Postman collection to test the endpoints.
  </Card>
</a>

## Next Steps

1. Grab your API token and instance UUID from the dashboard
2. Try sending a code with [Request Code](/v2/api-reference/otp/request-code)
3. Validate it with [Validate Code](/v2/api-reference/otp/validate-code)

That's it. You're ready to go.
