SMSframework GatewayAPI Provider
GatewayAPI Provider for smsframework.
Installation
Install from pypi:
$ pip install smsframework_gatewayapi
To receive SMS messages, you need to ensure that Flask microframework is also installed, as well as the JWT library:
$ pip install smsframework_gatewayapi[receiver]
Initialization
from smsframework import Gateway
from smsframework_gatewayapi import GatewayAPIProvider
gateway = Gateway()
gateway.add_provider('gapi', GatewayAPIProvider,
key='AAABBBBCCCCDDDD', secret='XAD*HHH(aaaaa'
)
Config
Source: /smsframework_gatewayapi/provider.py
key: API keysecret: API secretjwt_secret: Secret token for the JWT header (only for REST webhook that receives messages)
Example
from smsframework import Gateway, OutgoingMessage
# Send a regular message
gateway.send(OutgoingMessage('+19991112233', 'Test'))
# Send a premium message
gateway.send(OutgoingMessage('+19991112233', 'Test').options(escalate=True))
Supported Options
validity_period: Message expiration time in minutessenderId: Alpha-numeric SenderIdescalate: Premium message
Provider-Specific Parameters
See https://gatewayapi.com/docs/rest.html#post--rest-mtsms
Receivers
Source: /smsframework_gatewayapi/receiver.py
GatewayApi uses a single webhook URL to receive both messages and status reports.
Webhook URL: <provider-name>/callback
In order to configure it, go to the API/Webhooks section in the
control panel, and add a new "REST" webhook.
The URL will be something like this: http://.../<prefix>/<provider-name>/callback
In the Authentication section, you can specify a JWT secret token. Pass it to the GatewayAPIProvider
in order to have secure message reception.
Metadata
Release files for smsframework-gatewayapi 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smsframework_gatewayapi-0.0.1.tar.gz | 6.3 kB | Without provenance | Details for smsframework_gatewayapi-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smsframework_gatewayapi-0.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for smsframework_gatewayapi-0.0.1-py2.py3-none-any.whl |
Total release size: 13.8 kB
Release files / smsframework_gatewayapi-0.0.1.tar.gz
| Download URL | smsframework_gatewayapi-0.0.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3da883dd2002c03497e8a3725d7187d437d252e9d752e24a898e353e6e774b8d
|
|
BLAKE2b-256 checksum How to use checksums |
9cdbb5766d9c0b17094e7021af5972ea6d27276e251c9b77376b932e7caf565f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.7
|
Release files / smsframework_gatewayapi-0.0.1-py2.py3-none-any.whl
| Download URL | smsframework_gatewayapi-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0366761ff39c28c4ffd2731ebf6926e613fc81e7053db7bc7784d84d36e5ca4a
|
|
BLAKE2b-256 checksum How to use checksums |
7f155231d1075dad1be9f856237699cfe52845dcbad474698a8d59065ff31e47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.7
|
Security for smsframework-gatewayapi 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.