This guide covers the breaking changes and updates required when upgrading to support SMSPoh API v3.
The configuration structure has been updated to align with the API v3 authentication standards (key and secret) and field naming (from).
'smspoh' => [
'endpoint' => env('SMSPOH_ENDPOINT', 'https://smspoh.com/api/v2/send'),
'token' => env('SMSPOH_TOKEN', 'YOUR SMSPOH TOKEN HERE'),
'sender' => env('SMSPOH_SENDER', 'YOUR SMSPOH SENDER HERE')
],In v3, you should use key and secret instead of token. The endpoint is now defaulting to the v3 REST URL and can usually be omitted. Additionally, sender is now from.
'smspoh' => [
'key' => env('SMSPOH_KEY', 'YOUR SMSPOH KEY HERE'),
'secret' => env('SMSPOH_SECRET', 'YOUR SMSPOH SECRET HERE'),
'from' => env('SMSPOH_FROM', 'YOUR SMSPOH SENDER HERE') // previously 'sender'
],Note
Backward compatibility is maintained for sender in config and token fallback, but upgrading to the new keys is strongly recommended.
- Deprecated
sender(): Thesender()method has been deprecated. Usefrom()instead. - New
from(): Use this to define the Sender ID for the message. - New
clientReference(): You can now pass unique client references withclientReference('your-reference-id').
- return (new SmspohMessage)->content('Hello')->sender('Company');
+ return (new SmspohMessage)->content('Hello')->from('Company');If you construct SmspohApi manually, it now internally expects a generated token standard base64_encode("$key:$secret").
The default Endpoint constant fallback uses https://v3.smspoh.com/api/rest/send via SmspohApi::ENDPOINT.