Pingtochat Docs

Pingtochat Docs

Did You Know?

You can create any type of product documentation with Docy

leafleafleafDocy banner shape 01Docy banner shape 02Man illustrationFlower illustration

Copy-Code Template

Estimated reading: 2 minutes 52 views

This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs).

Endpoint

http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates
  • {{your_domain}}: Your domain URL where the API is hosted.
  • {{phone_number_id}}: The unique identifier of the phone number used for sending messages.
  • {{key}}: Your API key for authentication.How to create key

Request Headers

  • Authorization: Bearer token for authentication.
  • Content-Type: Should be set to application/json.

Template Information

  • Name: authentication_copy_code_button_one
  • Language: en_US (English – United States)
  • Category: AUTHENTICATION
  • Message Send TTL: 60 seconds
  • Allow Category Change: No

Components

The authentication_copy_code_button_one consists of a Body, Footer, and Buttons component.

Body

  • Type: BODY
  • Security Recommendation: true
  • Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential.

Footer

  • Type: FOOTER
  • Code Expiration: 5 minutes
  • Purpose: Informs the user of the OTP validity period.

Buttons

  • Type: BUTTONS
  • Buttons:
    • Type: otp
    • OTP Type: copy_code
    • Text: Copy Code

Sample Request

{
  "name": "authentication_copy_code_button_one",
  "language": "en_US",
  "category": "authentication",
  "message_send_ttl_seconds": 60,
  "components": [
    {
      "type": "body",
      "add_security_recommendation": true
    },
    {
      "type": "footer",
      "code_expiration_minutes": 5
    },
    {
      "type": "buttons",
      "buttons": [
        {
          "type": "otp",
          "otp_type": "copy_code",
          "text": "Copy Code"
        }
      ]
    }
  ]
}

Success Response

  • Status Code: 201 APPROVED
{
    "id": "xxxxxx",
    "status": "APPROVED",
    "category": "AUTHENTICATION"
}

Notes

  • This template is designed specifically for authentication purposes, including account verification and secure access.
  • The Copy Code button provides an easy way for users to manually copy and paste the OTP.
  • The message format supports variable placeholders, making it adaptable for multiple authentication scenarios.

Leave a Comment

Share this Doc

Copy-Code Template

Or copy link

CONTENTS