OneRoute
  • Introduction
  • Prerequisites
  • Whatsapp API
    • Sandbox (Test API Key)
    • Getting Started
    • Endpoints
      • Fetch Channels
      • Fetch Channel Templates
      • Send Template Message
      • Send Campaign Message
      • Send Session Message
    • FAQ
  • EMAIL API
    • Getting Started
    • Endpoints
      • Fetch Email Channels
      • Send Email to Customers
  • SMS API
    • Getting Started
    • Endpoints
      • Fetch SMS Channels
      • Send SMS to Customers
      • Send OTP SMS to Customers
      • Fetch SMS Messages
      • Get SMS DLR Message
  • ONEOTP API
    • Getting Started
    • Endpoints
      • Fetch OTP Templates
      • Send OTP
      • Verify OTP
  • EMBED
    • Getting Started
    • Installation
    • Push Notification
  • OTHERS
    • Receiving Events - Webhooks
    • Fetch Channel By Id
    • Fetch Logs
Powered by GitBook
On this page

Was this helpful?

  1. ONEOTP API
  2. Endpoints

Fetch OTP Templates

Fetch OTP Templates

GET https://api.oneroute.io/api/oneotp/templates

With this endpoint, you can choose from a list of OTP templates and retrieve the ID of the template you wish to send to the customer.

Headers

Name
Type
Description

apikey

string

API key for Authentication.

{
    "body": [
        {
            "id": "86681a74-ecdb-4492-9e75-93dadb9f8a29",
            "body": "Your {{firm}} OTP code is {{otp}}.",
            "name": "otp_template_simple",
            "namespace": "5000f34c_d9ab_4fd8_aa48_d9091f1d21ff",
            "data": [],
            "locale": "en",
            "policy": "DETERMINISTIC",
            "status": "approved",
            "type": "text",
            "scope": "oneOTP",
            "createdAt": "2021-10-02T14:00:29.937Z",
            "updatedAt": "2021-10-02T14:00:29.937Z",
            "firm_id": null
        },
        {
            "id": "ad90555b-46fa-433c-a350-9cc8911b4362",
            "body": "Your One Time Password (OTP) for {{firm}} is {{otp}}. Do not share your OTP with anyone.",
            "name": "otp_template",
            "namespace": "5000f34c_d9ab_4fd8_aa48_d9091f1d21ff",
            "data": [],
            "locale": "en_GB",
            "policy": "DETERMINISTIC",
            "status": "approved",
            "type": "text",
            "scope": "oneOTP",
            "createdAt": "2021-10-02T14:00:29.937Z",
            "updatedAt": "2021-10-02T14:00:29.937Z",
            "firm_id": null
        },
        {
            "id": "63d45b42-0898-43b3-b81d-1fb2d45bc78f",
            "body": "Your One Time Password (OTP) for {{firm}} is {{otp}}. Do not share your OTP with anyone. This code will expire in {{minutes}} minutes.",
            "name": "otp_template_expiry",
            "namespace": "5000f34c_d9ab_4fd8_aa48_d9091f1d21ff",
            "data": [],
            "locale": "en",
            "policy": "DETERMINISTIC",
            "status": "approved",
            "type": "text",
            "scope": "oneOTP",
            "createdAt": "2021-10-02T14:00:29.937Z",
            "updatedAt": "2021-10-02T14:00:29.937Z",
            "firm_id": null
        }
    ],
    "message": "OneOTP Templates fetched successfully",
    "success": true
}
{
    "data": null,
    "message": "Invalid API Key",
    "success": false
}

PreviousEndpointsNextSend OTP

Last updated 3 years ago

Was this helpful?