Download the PHP package bhaskarvyas001/interakt-api-php without Composer
On this page you can find all versions of the php package bhaskarvyas001/interakt-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bhaskarvyas001/interakt-api-php
More information about bhaskarvyas001/interakt-api-php
Files in bhaskarvyas001/interakt-api-php
Package interakt-api-php
Short Description The easy way to integrate APIs for Interakt in PHP
License MIT
Informations about the package interakt-api-php
Interakt APIs PHP
A PHP port of the Interakt api SDK with user and event tracking support.
Installation
Usage
API
Track::user($userId, $countryCode, $phoneNumber, $traits)Track::event($userId, $event, $traits, $countryCode, $phoneNumber)Track::flush()Track::join()Track::shutdown()
Template Message (WhatsApp)
You can send WhatsApp template (HSM) messages using the SDK. The SDK provides a convenience method Track::sendTemplate() and a raw Track::message() call which posts to the /v1/public/message/ endpoint.
Example using sendTemplate:
Example sending a raw payload with Track::message:
The API responds with an id for the created message; delivery/read/failure status will be delivered later via webhooks.
Webhooks (message status and incoming messages)
Interakt sends webhooks for template delivery status (message_api_sent, message_api_delivered, message_api_read, message_api_failed) and for incoming messages (message_received). Webhooks are delivered to the URL configured in your Interakt developer settings.
Security: Interakt signs webhook payloads with HMAC SHA256 in the Interakt-Signature header (prefixed with sha256=). Use the SDK helper Interakt\Track\Webhook::verify() to validate the signature.
Example webhook verifier (PHP):
Notes:
- Your webhook endpoint must be HTTPS and respond within 3 seconds.
- Any non-200 response or timeout is treated as a delivery failure by Interakt.
- The
callbackDatayou passed when sending a template will be returned in the webhook payload so you can correlate messages.