Pingtochat Docs

Pingtochat Docs

Did You Know?

We design Docy for the readers, optimizing not for page views or engagement

leafleafleafDocy banner shape 01Docy banner shape 02Man illustrationFlower illustration

Auto-Fill to Zero-Tap

Estimated reading: 2 minutes 57 views

Create a Template

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.

Request Body

{
  "name": "autofill_to_zero_tab",
  "language": "en_US",
  "category": "authentication",
  "message_send_ttl_seconds": 60,
  "components": [
    {
      "type": "body",
      "add_security_recommendation": true
    },
    {
      "type": "footer",
      "code_expiration_minutes": 10
    },
    {
      "type": "buttons",
      "buttons": [
        {
          "type": "otp",
          "otp_type": "one_tap",
          "text": "Copy Code",
          "autofill_text": "Autofill",
          "package_name": "app.pingtochat.com",
          "signature_hash": "K8a/AINcGX7"
        }
      ]
    }
  ]
}

Components

  • Body: Includes security recommendations for authentication messages.
  • Footer: Specifies the OTP code expiration time (5 minutes).
  • Buttons:
    • OTP Type: zero_tap
    • Button Text: “Copy Code”
    • Autofill Text: “Autofill”
    • Zero Tap Terms Accepted: true
    • Supported Apps: Defines package names and signature hashes for authentication.

Success Response

Status Code: 201 APPROVED

{
    "id": "xxxxxx",
    "status": "APPROVED",
    "category": "MARKETING"
}

Edit an Existing Template

Endpoint

http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update

Request Body

{
    "components": [
        {
            "type": "body",
            "add_security_recommendation": true
        },
        {
            "type": "footer",
            "code_expiration_minutes": 5
        },
        {
            "type": "buttons",
            "buttons": [
                {
                    "type": "otp",
                    "otp_type": "zero_tap",
                    "text": "Copy Code",
                    "autofill_text": "Autofill",
                    "zero_tap_terms_accepted": true,
                    "supported_apps": [
                        {
                            "package_name": "com.example.luckyshrub",
                            "signature_hash": "K8a/AINcGX7"
                        }
                    ]
                }
            ]
        }
    ]
}

Components

  • Body: Includes security recommendations.
  • Footer: OTP code expiration time (10 minutes for one-tap, 5 minutes for zero-tap).
  • Buttons:
    • One Tap Option: Provides a copy code button with autofill capability.
    • Zero Tap Option: Supports direct authentication without manual entry.

Success Response

{
    "success": true,
    "id": "xxxxxx",
    "name": "autofill_to_zero_tab",
    "category": "marketing"
}

Notes

  • Ensure that {{your_domain}}, {{phone_number_id}}, and {{key}} are correctly replaced with actual values.
  • The zero_tap_terms_accepted field must be set to true for Zero Tap authentication.
  • The supported applications must match the package name and signature hash used for authentication.
  • This setup enables secure and seamless authentication experiences for users.

Leave a Comment

Share this Doc

Auto-Fill to Zero-Tap

Or copy link

CONTENTS