Summary

Currently, the SMSAPI module only supports the Polish SMSAPI.pl service. The underlying PHP library (smsapi/php-client) supports multiple regions:

  • smsapi.pl - Poland
  • smsapi.com - International (217 countries)
  • smsapi.se - Sweden
  • smsapi.bg - Bulgaria

This feature request adds a configuration option to select the service region, enabling international SMS support.

Problem

The module hardcodes smsapiPlService() in all service calls, making it impossible to use international SMSAPI.com accounts.

Proposed Solution

Add a new configuration option smsapi_service_region that allows selecting between PL, COM, SE, and BG services.

Changes

  • config/schema/smsapi.schema.yml - Add smsapi_service_region schema
  • config/install/smsapi.settings.yml - Add default value 'PL' for backward compatibility
  • src/Form/ConfigurationForm.php - Add region selector dropdown
  • src/Services/SmsapiService.php - Add getService() helper method that returns the correct service based on configuration

Backward Compatibility

The default value is 'PL', so existing installations will continue working without any changes.

Testing

  1. Apply the patch
  2. Go to /admin/config/system/smsapi
  3. Select "International (smsapi.com)" from the new dropdown
  4. Enter your SMSAPI.com token
  5. Test sending an SMS

Related Links

Issue fork smsapi-3569589

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

grzegorz.bartman created an issue. See original summary.

krystianbrzoza made their first commit to this issue’s fork.

krystianbrzoza’s picture

Status: Active » Fixed

Thanks for your contribution.
Functionality added in version 1.3.0

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.