GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Skocimis/textflow-python: Python package that helps you helps send SMS and verify users using TextFlow API

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
src/textflowsms
src/textflowsms
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
aa.py
aa.py
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

Textflow python client

PyPI PyPI

Supported Python Versions

This library supports the following Python implementations:

  • Python 3.6
  • Python 3.7
  • Python 3.8
  • Python 3.9
  • Python 3.10
  • Python 3.11

Installation

pip install textflowsms

Sending an SMS

To send an SMS, you have to create an API key using the Textflow dashboard. When you register an account, you automatically get an API key with one free SMS which you can send anywhere.

Just send a message

import textflowsms as tf
tf.useKey("YOUR_API_KEY");

tf.sendSMS("+381611231234", "Dummy message text...")

Handle send message request result

result = tf.sendSMS("+381611231234", "Dummy message text...")
if(result.ok):
  print(result.data)
else:
  print(result.message)

Example result object of the successfully sent message

{
    "ok": true,
    "status": 200,
    "message": "Message sent successfully",
    "data": {
        "to": "+381611231234",
        "content": "Dummy message text...",
        "country_code": "RS",
        "price": 0.05,
        "timestamp": 1674759108881
    }
}

Example result object of the unsuccessfully sent message

{
    "ok": false,
    "status": 404,
    "message": "API key not found"
}

Verifying a phone number

You can also use our service to easily verify a phone number, without storing data about the phones that you are about to verify, because we can do it for you.

Example usage

# User has sent his phone number for verification
resultSMS = tf.sendVerificationSMS ("+11234567890", service_name, seconds);

# Show him the code submission form
# We will handle the verification code ourselves

# The user has submitted the code
resultCode = tf.VerifyCode("+11234567890", user_entered_code);
# if `resultCode.valid` is True, then the phone number is verified. 

Verification options

service_name is what the user will see in the verification message, e. g. "Your verification code for Guest is: CODE"

seconds is how many seconds the code is valid. Default is 10 minutes. Maximum is one day.

Getting help

If you need help installing or using the library, please check the FAQ first, and contact us at [email protected] if you don't find an answer to your question.

If you've found a bug in the API, package or would like new features added, you are also free to contact us!

About

Python package that helps you helps send SMS and verify users using TextFlow API

textflow.me

Topics

apiapi-clientpythonpython-librarypython-smspython3simple-smssmssms-apisms-pythonsms-python-packagesms-verificationtext-messageuser-verification

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.