Download the PHP package iletiniz/sdk without Composer

On this page you can find all versions of the php package iletiniz/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

İletiniz PHP SDK

Iletiniz API için resmi PHP SDK'si. PHP 8.1+ üzerinde çalışır.

Kurulum

Gereksinimler:

Hızlı başlangıç

apiKey verilmediğinde SDK ILETINIZ_API_KEY ortam değişkenini okur.

Yapılandırma

Endpoint'ler

SDK, public API yüzeyini kapsar:

Metot HTTP
$client->health->check() GET /v1/health
$client->messages->send($params) POST /v1/messages
$client->messages->sendBulk($params) POST /v1/messages/bulk
$client->messages->retrieve($jobId) GET /v1/messages/{jobId}
$client->messages->status($jobId) (alias) GET /v1/messages/{jobId}
$client->scheduled->list($params) GET /v1/scheduled
$client->scheduled->retrieve($id) GET /v1/scheduled/{id}
$client->scheduled->cancel($id) DELETE /v1/scheduled/{id}
$client->reminders->create($params) POST /v1/reminders
$client->reminders->list($params) GET /v1/reminders
$client->reminders->retrieve($id) GET /v1/reminders/{id}
$client->reminders->update($id, $params) PATCH /v1/reminders/{id}
$client->reminders->delete($id) DELETE /v1/reminders/{id}
$client->partner->profile() GET /v1/partner
$client->partner->createAccount($params) POST /v1/partner/accounts
$client->partner->listAccounts($params) GET /v1/partner/accounts
$client->partner->retrieveAccount($id) GET /v1/partner/accounts/{id}
$client->partner->suspendAccount($id) / unsuspendAccount($id) POST /v1/partner/accounts/{id}/suspend / unsuspend
$client->partner->createApiKey($id, $params) POST /v1/partner/accounts/{id}/api-keys
$client->partner->listApiKeys($id) GET /v1/partner/accounts/{id}/api-keys
$client->partner->revokeApiKey($id, $keyId) DELETE /v1/partner/accounts/{id}/api-keys/{keyId}
$client->partner->transferQuota($id, $amount) POST /v1/partner/accounts/{id}/quota-transfers
$client->partner->createWhatsappSignupLink($id) POST /v1/partner/accounts/{id}/whatsapp-signup
$client->whatsapp->downloadMedia($wamid) / saveMedia($wamid, $path) GET /v1/whatsapp/messages/{wamid}/media
Webhook::verify($payload, $headers, $secret) / Webhook::parse(...) (yerel imza doğrulaması)

Tek mesaj göndermek

Telegram üzerinden göndermek

'provider' => 'telegram' seçildiğinde to alanı SMS yerine Telegram alıcı tanımlayıcısı bekler: numerik chat_id (örn 8409353994, gruplar için -1001234567890) veya @kullaniciadi. sender Telegram için kullanılmaz — bot kimliği bağlantıdaki token'a gömülüdür.

Sağlayıcılar-arası fallback

Birincil sağlayıcı mesajı reddederse (hard-fail: sağlayıcı hata döner veya bağlantı kurulamaz), aynı mesaj (aynı alıcı, aynı içerik, aynı SMS kanalı) sıradaki yedek sağlayıcıyla otomatik yeniden denenir. İlk başarıda durur. fallback en fazla 3 sağlayıcı kodundan oluşan sıralı bir dizidir; hepsi müşterinin bağlı kind: sms sağlayıcıları olmalı ve ne birincil ile ne de birbirleriyle aynı olabilir.

Kota tek sayım: Bir mantıksal mesaj, kaç sağlayıcı denenirse denensin tek kota harcar; hepsi başarısız olursa hiç kota harcanmaz.

Kapsam: Yalnızca reddte (hard-fail) tetiklenir ve yalnızca SMS→SMS'tir (kanallar arası değil, örn. WhatsApp→SMS yok). "Teslim edilemedi / timeout" için otomatik fallback henüz yoktur (gelecek sürüm).

sendBulk yanıtında kabul eden sağlayıcı, öğe bazında delivered_via alanında döner.

Template ile göndermek

body, template, whatsappTemplate ve whatsappMessage alanlarından tam olarak biri zorunludur. variables yalnızca template ile birlikte verilebilir.

Toplu gönderim

Tek istekte en fazla 200 öğe gönderebilirsiniz.

Onaylı WhatsApp şablonu göndermek

Meta'da onaylanmış (APPROVED) bir şablonu whatsappTemplate ile gönderin. components, Meta Cloud API'nin template.components biçimini izler. sender, WhatsApp'ta gönderici numaranın Meta phone_number_id değeridir (verilmezse bağlantının numarası kullanılır).

Toplu gönderimde alıcı başına değişkenler items[].whatsappComponents ile verilir:

WhatsApp oturum mesajı (buton, liste, medya)

Son 24 saat içinde size yazmış bir kişiye şablonsuz mesaj göndermek için whatsappMessage kullanın. Sohbet botu yanıtları bu yolla gider. Pencere dışındaysa API reengagement_window_expired hatası döner; o durumda onaylı şablon gönderin. whatsappMessage zamanlanamaz ve toplu gönderimde kullanılamaz.

type Alanlar
text text (en çok 4096), previewUrl
buttons body (1024), buttons 1-3 × id (256) + title (20), header, footer (60)
list body (4096), buttonText (20), sections 1-10 × title (24) + rows; toplam en çok 10 satır, satır id (200), title (24), description (72); header düz metin (60)
cta_url body (1024), displayText (20), url, header, footer
image, video link (https), caption (1024)
document link (https), caption, filename
audio link (https)
location latitude, longitude, name, address

buttons ve cta_url başlığı ['type' => 'text', 'text' => '...'] ya da ['type' => 'image' | 'video' | 'document', 'link' => 'https://...'] olabilir. Tam örnek: examples/send-buttons.php.

WhatsApp gelen mesajlar (webhook)

Panelde webhook endpoint'iniz için "WhatsApp mesajı alındı" (message.received) ve "Telefondan gönderildi" (message.echo) olaylarını açıkça seçin. Bu iki olay mesaj içeriğini taşıdığı için yalnız seçilirse gönderilir.

Tam sohbet botu örneği: examples/chatbot-webhook.php.

Zamanlanmış gönderim

scheduledAt (ISO 8601 dizesi veya DateTimeInterface) verilirse mesaj şimdi gönderilmez; yanıt scheduled_id içerir. En az 30 sn, en fazla 90 gün sonrası.

Hatırlatma kuralları

Partner API

Partner hesabının partner:manage yetkili canlı anahtarıyla:

transferQuota, createAccount ve createApiKey istekleri hata durumunda otomatik yeniden denenmez.

Mesaj durumunu sorgulamak

Sağlık kontrolü

Hata yönetimi

Tüm hatalar Iletiniz\Exception\IletinizError sınıfından türetilir. HTTP status'a göre uygun alt sınıf fırlatılır:

Yeniden deneme stratejisi

SDK, aşağıdaki durumlarda otomatik olarak maxRetries defa yeniden dener (varsayılan: 2):

Retry-After başlığı varsa beklenir; aksi halde exponential backoff (jitter ile) uygulanır. Yeniden denemeyi kapatmak için maxRetries: 0 verin.

Timeout

Her istek için ayrıca timeout verebilirsiniz:

Test

SDK, Iletiniz\Http\TransportInterface üzerinden HTTP katmanını dışarı açar. Testlerinizde gerçek ağ trafiği oluşturmadan SDK'yı kullanabilirsiniz:

Katkıda Bulunma / Contributing

Katkı sağlamak ister misiniz? Lütfen CONTRIBUTING.en.md.

Davranış Kuralları / Code of Conduct

Bu proje CODE_OF_CONDUCT.en.md.

Güvenlik / Security

Güvenlik açığı bildirmek için lütfen SECURITY.en.md.

Lisans / License

MIT — bkz. / see LICENSE.


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package iletiniz/sdk contains the following files

Loading the files please wait ...