{{ __('SMS') }}
{{ __('Twilio · MSG91 · Custom API') }}
{{ session('status') }}
@endif
@if (session('error'))
{{ session('error') }}
@endif
@if ($errors->any())
{{ __('Couldn’t connect the SMS number:') }}
- @foreach ($errors->all() as $err)
- {{ $err }} @endforeach
{{-- Tab nav --}}
@foreach ([
['numbers', __('Numbers'), 'list'],
['provider', __('Add provider'), 'plus'],
['custom', __('Custom API'), 'plug'],
['lookup', __('Check number'), 'search'],
['guide', __('Setup guide'), 'book-open'],
] as [$key, $label, $icon])
@endforeach
{{-- ============ NUMBERS ============ --}}
{{-- Webhook URLs reminder --}}
{{-- Connected numbers --}}
@if ($senders->isEmpty())
@else
{{-- ============ ADD PROVIDER ============ --}}
{{-- ============ CUSTOM API ============ --}}
{{-- ============ CHECK NUMBER ============ --}}
{{-- ============ SETUP GUIDE ============ --}}
{{ __('Paste these into your provider') }}
@foreach ([[__('Inbound / Messaging webhook'), $inboundUrl, __('Twilio: number → Messaging → “A message comes in” (HTTP POST).')], [__('Delivery-status callback'), $statusUrl, __('Twilio: same number → “Status callback URL”.')]] as [$lbl, $url, $hint])
@endforeach
{{ $lbl }}
{{ $url }}
{{ $hint }}
{{ __('Connected numbers') }}
{{ $senders->count() }} {{ __('total') }}{{ __('No SMS number connected yet.') }}
@foreach ($senders as $s)
@php
$meta = is_array($s->meta_json) ? $s->meta_json : [];
$prov = strtolower($meta['sms_provider'] ?? 'twilio');
$connected = $s->status === \App\Models\WaProviderConfig::STATUS_CONNECTED;
$provLabel = ['twilio'=>'Twilio','msg91'=>'MSG91','vonage'=>'Vonage','plivo'=>'Plivo','messagebird'=>'MessageBird','bird'=>'MessageBird','sinch'=>'Sinch','telnyx'=>'Telnyx','custom'=>'Custom API'][$prov] ?? ucfirst($prov);
$accent = $prov === 'custom' ? 'bg-[#EEF2FF] text-[#4F46E5]' : ($prov === 'msg91' ? 'bg-accent-amber/15 text-accent-amber' : 'bg-wa-mint text-wa-deep');
@endphp
@endforeach
@endif
{{ $s->phone_number }}
{{ $provLabel }}
{{ $connected ? __('Active') : __('Inactive') }}
- {{ __('Rate / segment') }}
- {{ ($meta['rate_per_segment'] ?? null) !== null ? ($meta['rate_per_segment'] . ' ' . ($meta['currency'] ?? 'USD')) : __('—') }}
- {{ __('DLT sender') }}
- {{ $meta['sender_id'] ?? '—' }}
- {{ __('Inbound URL') }}
- {{ $inboundUrl }}/custom/{{ $meta['custom_in']['token'] }}
{{ __('Connect a provider number') }}
{{ __('Twilio, Vonage, Plivo, MessageBird, Sinch, Telnyx or MSG91. Add as many as you need.') }} @if ($hasTwilio) {{ __('You already have Twilio — leave the SID / token blank to reuse those keys.') }} @endif
@include('user.devices._sms_form', ['smsReturnTo' => '/sms']){{ __('Connect a custom SMS API') }}
{{ __('Any provider not listed — describe its send API, test it, and it works in campaigns and broadcasts like any other sender.') }}
@include('user.devices._sms_custom_form'){{ __('Check a number before you text it') }}
{{ __('SMS is charged on submission — a landline or dead number costs the same. Twilio Lookup tells you which is which.') }}
{{ __('How it works') }}
- {{ __('Connect a provider number (Twilio/MSG91/…) or a custom SMS API.') }}
- {{ __('Paste the Inbound + Delivery-status URLs into your provider.') }}
- {{ __('Inbound texts land in the same Team Inbox as WhatsApp.') }}
- {{ __('Campaigns & broadcasts gain an SMS sender — billed to your plan’s SMS quota, never the WhatsApp wallet.') }}
{{ __('Twilio (global)') }}
- {{ __('Copy your Account SID (starts “AC”) + Auth Token from the Twilio Console. An API Key (“SK…”) will NOT work.') }}
- {{ __('Buy an SMS-capable number (or use the trial number), then paste number + keys in “Add provider”.') }}
- {{ __('Number → Messaging → “A message comes in”: HTTP POST to the Inbound webhook.') }}
- {{ __('Set the “Status callback URL” to the Delivery-status URL.') }}
- {{ __('Trial accounts only text verified numbers and refuse custom text — add billing to send freely.') }}
{{ __('MSG91 (India / DLT)') }}
- {{ __('Indian carriers filter foreign long-codes — use MSG91 with DLT for reliable India delivery.') }}
- {{ __('Paste your MSG91 Auth Key in the Auth Token / Auth Key field.') }}
- {{ __('Register a 6-letter DLT Sender ID (e.g. :example) + your DLT template on the DLT portal, then paste both in the MSG91 options.', ['example' => brand_token(6)]) }}
{{ __('Custom SMS API (any provider)') }}
{{ __('Open the “Custom API” tab and describe your provider’s HTTP API. It then works in campaigns and broadcasts like any other sender.') }}
- {{ __('From your provider’s docs, note: the send URL, GET or POST, the body shape (JSON / form / query string), and which header carries the key.') }}
- {{ __('Fill the Send request: URL, method, body type, headers (e.g. “Authorization: Bearer {api_key}”) and the body template (e.g. {"to":"{to}","message":"{text}"}).') }}
- {{ __('Use placeholders — filled per message: {to} {to_e164} · {text} {text_url} · {from} {sender_id} · {api_key} {api_secret} · {segments}.') }}
- {{ __('Put your real key in “API key” — encrypted and injected into {api_key} at send time, never stored in the template.') }}
- {{ __('Optional: set “Success contains” and “Message-ID path” (e.g. data.id).') }}
- {{ __('Click “Send test” with a test number to fire one real message BEFORE saving.') }}
- {{ __('For replies & reports, open “Receive…”, paste the generated Inbound + DLR URLs into your provider, and map the from / text / status fields.') }}
- {{ __('Save, then pick this gateway as the SMS sender in a campaign or broadcast.') }}
{{ __('Segments, cost & billing') }}
- {{ __('One SMS = 160 characters (GSM-7). A single emoji / non-Latin character drops the limit to 70 (UCS-2) and can triple the cost.') }}
- {{ __('The rate per segment is used for your SMS spend reporting only.') }}
- {{ __('SMS is metered by your plan’s monthly SMS quota — NEVER billed to the WhatsApp wallet.') }}
- {{ __('An alphanumeric sender ID is one-way: customers get no number to reply to, so inbound never arrives.') }}