Skip to content

Conversation

@caronc
Copy link
Owner

@caronc caronc commented Nov 2, 2025

Description:

Related issue (if applicable): #
This PR adds a new SMS notification service for 46elks. It provides a minimal, fixed-endpoint implementation that uses HTTP Basic Auth and posts to https://api.46elks.com/a1/sms. Phone numbers are parsed and validated using Apprise’s built-in helpers, and multiple recipients are supported via path segments.

46elks Notifications

  • Source: https://46elks.com/
  • Icon Support: No
  • Message Format: Plain Text
  • Message Limit: 160 characters

46elks is a straightforward SMS provider. You authenticate with your 46elks API user and password, then send to, message, and optionally from. The plugin loops per target recipient and posts form-encoded payloads to the fixed API endpoint.

Setup Instructions

  1. Log in at https://46elks.com and obtain your API username and password.
  2. Optionally choose a From sender ID, either an E.164 number or an approved alphanumeric sender.
  3. Use the 46elks:// URL form in Apprise to send messages.

Syntax

Valid syntax is as follows:

  • 46elks://{user}:{password}@/{from}
  • 46elks://{user}:{password}@/{from}/{to}
  • 46elks://{user}:{password}@/{from}/{to1}/{to2}/{toN}

You may also use elks:// as well (instead of 46elks://)! 🚀

Optional query parameters:

  • from= sender ID or E.164 number

Aliases:

  • to= can be used in query strings and YAML to supply recipients

Examples

  • 46elks://user:pass@/+15551234567
  • 46elks://user:pass@/+15551234567/+46701234567?from=Acme

YAML-friendly query param:

apprise -vv -b "Body only" \
  "46elks://user:pass@/?to=+15551234567&from=Acme"

Parameter Breakdown

Variable Required Description
user Yes Your 46elks API username
password Yes Your 46elks API password
to Yes Recipient phone number(s), E.164 recommended
from No Sender ID or E.164 number, if configured in 46elks

Examples

Send a simple message:

apprise -vv -t "Test" -b "Hello from Apprise" \
  46elks://user:pass@/+15551234567

Multiple recipients and a sender ID:

apprise -vv -b "Status: OK" \
  "46elks://user:pass@/+15551234567/+46701234567?from=Acme"

New Service Completion Status

  • apprise/plugins/fortysixelks.py
  • pyproject.toml update, add 46elks to keywords (alphabetically)
  • README.md table entry
  • packaging/redhat/python-apprise.spec update, add 46elks to %global common_description

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (tox -e lint and tox -e format).
  • Test coverage added (tox -e minimal).

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@46elks-support

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  46elks://user:pass@/+15551234567

# If you have cloned the branch and have tox available to you
# the following can also allow you to test:
tox -e apprise -- -t "Test Title" -b "Test Message" \
  46elks://user:pass@/+15551234567

@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.65%. Comparing base (74d5ad2) to head (cb0c02b).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1438    +/-   ##
========================================
  Coverage   99.65%   99.65%            
========================================
  Files         174      175     +1     
  Lines       22554    22660   +106     
  Branches     3587     3603    +16     
========================================
+ Hits        22476    22582   +106     
  Misses         70       70            
  Partials        8        8            
Files with missing lines Coverage Δ
apprise/plugins/fortysixelks.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@caronc caronc requested a review from Copilot November 2, 2025 18:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the 46elks SMS notification service to Apprise. 46elks is a Swedish telecommunications service provider that offers SMS APIs.

Key changes:

  • New plugin implementation for 46elks SMS notifications with authentication, phone number validation, and configurable sender IDs
  • Comprehensive test coverage including URL parsing, edge cases, and error handling
  • Updated documentation and package metadata to include 46elks in the list of supported services

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
apprise/plugins/fortysixelks.py New plugin implementation for 46elks SMS service with full notification support
tests/test_plugin_fortysixelks.py Test suite covering URL formats, privacy mode, error handling, and notification behavior
tests/helpers/rest.py Helper refactoring to handle False meta values more cleanly by converting to default TypeError structure
pyproject.toml Added "46elks" to keywords list
packaging/redhat/python-apprise.spec Added 46elks to supported services list in package description
README.md Added 46elks to SMS notifications table with documentation link

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@caronc caronc merged commit 1ba14a7 into master Nov 6, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants