textlink


Nametextlink JSON
Version 0.0.1 PyPI version JSON
download
home_page
SummaryPython library that helps you send SMS using TextLink API
upload_time2024-03-07 23:43:55
maintainer
docs_urlNone
author
requires_python>=3.6
license
keywords api api-client bulk-sms simple-sms sms sms-api sms-gateway sms-verification text-message user-verification
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TextLink python client

[![PyPI](https://img.shields.io/pypi/v/textlink.svg)](https://pypi.python.org/pypi/textlink)
[![PyPI](https://img.shields.io/pypi/pyversions/textlink.svg)](https://pypi.python.org/pypi/textlink)

### 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
* Python 3.12

## Installation
`pip install textlink`

## Sending an SMS

To send an SMS, you have to create an API key using the [TextLink dashboard](https://textlinksms.com/dashboard/api). When you register an account, you automatically get an API key with one free SMS which you can send anywhere.

### Just send a message

```python
import textlinksms as tl
tl.useKey("YOUR_API_KEY")

tl.sendSMS("+381611231234", "Dummy message text...")
```

### Handle response

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

### Example result object of the successfully sent message

```json
{
    "ok": true
}
```

### Example result object of the unsuccessfully sent message

```json
{
    "ok": false,
    "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

```python
# User has sent his phone number for verification
resultSMS = tl.sendVerificationSMS ("+11234567890", service_name, expiration_time, source_country)

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

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

#### Verification options (Optional)

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

`expiration_time` is how many miliseconds the code is valid. Default is 10 minutes.

`source_country` is the ISO-2 code of the sender's phone number country.

## Getting help

If you need help installing or using the library, please check the [FAQ](https://textlinksms.com) first, and contact us at [help@textlinksms.com](mailto://help@textlinksms.com) 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!

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "textlink",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "api,api-client,bulk-sms,simple-sms,sms,sms-api,sms-gateway,sms-verification,text-message,user-verification",
    "author": "",
    "author_email": "TextLink <help@textlinksms.com>",
    "download_url": "https://files.pythonhosted.org/packages/9c/d2/7094c3a7360b8c39b053b076b8f74d19787b1b78d1ae0fa65a3d06dcd703/textlink-0.0.1.tar.gz",
    "platform": null,
    "description": "# TextLink python client\n\n[![PyPI](https://img.shields.io/pypi/v/textlink.svg)](https://pypi.python.org/pypi/textlink)\n[![PyPI](https://img.shields.io/pypi/pyversions/textlink.svg)](https://pypi.python.org/pypi/textlink)\n\n### Supported Python Versions\n\nThis library supports the following Python implementations:\n\n* Python 3.6\n* Python 3.7\n* Python 3.8\n* Python 3.9\n* Python 3.10\n* Python 3.11\n* Python 3.12\n\n## Installation\n`pip install textlink`\n\n## Sending an SMS\n\nTo send an SMS, you have to create an API key using the [TextLink dashboard](https://textlinksms.com/dashboard/api). When you register an account, you automatically get an API key with one free SMS which you can send anywhere.\n\n### Just send a message\n\n```python\nimport textlinksms as tl\ntl.useKey(\"YOUR_API_KEY\")\n\ntl.sendSMS(\"+381611231234\", \"Dummy message text...\")\n```\n\n### Handle response\n\n```python\nresult = tl.sendSMS(\"+381611231234\", \"Dummy message text...\")\nif(result.ok):\n  print(result.data)\nelse:\n  print(result.message)\n```\n\n### Example result object of the successfully sent message\n\n```json\n{\n    \"ok\": true\n}\n```\n\n### Example result object of the unsuccessfully sent message\n\n```json\n{\n    \"ok\": false,\n    \"message\": \"API key not found\"\n}\n```\n\n## Verifying a phone number\n\nYou 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.\n\n### Example usage\n\n```python\n# User has sent his phone number for verification\nresultSMS = tl.sendVerificationSMS (\"+11234567890\", service_name, expiration_time, source_country)\n\n# Show him the code submission form\n# We will handle the verification code ourselves\n\n# The user has submitted the code\nresultCode = tl.verifyCode(\"+11234567890\", user_entered_code)\n# if `resultCode.valid` is True, then the phone number is verified. \n```\n\n#### Verification options (Optional)\n\n`service_name` is what the user will see in the verification message, e. g. `\"Your verification code for Guest is: CODE\"`\n\n`expiration_time` is how many miliseconds the code is valid. Default is 10 minutes.\n\n`source_country` is the ISO-2 code of the sender's phone number country.\n\n## Getting help\n\nIf you need help installing or using the library, please check the [FAQ](https://textlinksms.com) first, and contact us at [help@textlinksms.com](mailto://help@textlinksms.com) if you don't find an answer to your question.\n\nIf you've found a bug in the API, package or would like new features added, you are also free to contact us!\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python library that helps you send SMS using TextLink API",
    "version": "0.0.1",
    "project_urls": null,
    "split_keywords": [
        "api",
        "api-client",
        "bulk-sms",
        "simple-sms",
        "sms",
        "sms-api",
        "sms-gateway",
        "sms-verification",
        "text-message",
        "user-verification"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c26dd59dc86bd82645b0d962b84c6dfe6c00864c1662eeaaf5fd91d4b227a1d2",
                "md5": "dc3491df2d94c3bd11f071c73d364a60",
                "sha256": "71d3d9edcf5557876da0c0f5ebe1cb64e972233e8aea77068f91ced8fc924df4"
            },
            "downloads": -1,
            "filename": "textlink-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dc3491df2d94c3bd11f071c73d364a60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4537,
            "upload_time": "2024-03-07T23:43:54",
            "upload_time_iso_8601": "2024-03-07T23:43:54.110212Z",
            "url": "https://files.pythonhosted.org/packages/c2/6d/d59dc86bd82645b0d962b84c6dfe6c00864c1662eeaaf5fd91d4b227a1d2/textlink-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9cd27094c3a7360b8c39b053b076b8f74d19787b1b78d1ae0fa65a3d06dcd703",
                "md5": "e05ff56f030a127649ff447cf6230ac8",
                "sha256": "f1a27d6b183d974f5324f0ea5dc967c5eeb45bb02e7855f2f232897573898919"
            },
            "downloads": -1,
            "filename": "textlink-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e05ff56f030a127649ff447cf6230ac8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3913,
            "upload_time": "2024-03-07T23:43:55",
            "upload_time_iso_8601": "2024-03-07T23:43:55.983881Z",
            "url": "https://files.pythonhosted.org/packages/9c/d2/7094c3a7360b8c39b053b076b8f74d19787b1b78d1ae0fa65a3d06dcd703/textlink-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-07 23:43:55",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "textlink"
}
        
Elapsed time: 3.23818s