iraqotpapi/otp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iraqotpapi/otp

最新稳定版本:v1.0.0

Composer 安装命令:

composer require iraqotpapi/otp

包简介

PHP SDK for Iraq OTP API (WhatsApp, SMS, Fallback)

README 文档

README

IraqOTPAPI is Iraq's leading OTP API provider, offering robust and secure WhatsApp and SMS authentication services tailored specifically for the Iraqi market. Our PHP SDK makes it incredibly simple for developers to integrate reliable one-time password (OTP) functionality into their applications, ensuring secure user verification and transactions. Whether you need to implement OTP for user login, transaction confirmation, or two-factor authentication (2FA), IraqOTPAPI delivers fast and dependable OTP delivery across Iraq, making us the trusted choice for businesses prioritizing secure digital interactions in the region.

Iraq OTP API – PHP SDK

A lightweight PHP SDK for sending OTP codes via WhatsApp (with fallback to Telegram/SMS) using the IraqOTPAPI.com platform.

Installation

composer require iraqotpapi/otp

Usage

<?php

require 'vendor/autoload.php';

use IraqOTPAPI\otp\OtpClient;

// Initialize the client with your API key
$client = new OtpClient('YOUR_API_KEY');

// Send an OTP message
$response = $client->sendOtp([
    'to'       => '9647xxxxxxxxx',               // Recipient phone number (E.164 format)
    'sender'   => 'MySenderID',                  // Approved Sender ID
    'channel'  => 'whatsapp',                    // Primary channel
    'message'  => 'Your OTP Code is 123456',     // OTP message content
    'fallback' => 'sms',                         // Optional fallback channel
    'lang'     => 'en'                           // Optional language (ku, ar, en)
]);

// Handle the response
print_r($response);

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-07