Skip to main content

Unofficial Akedly OTP API Client

Project description

Akedly Python Client

Akedly Client is an unofficial Python wrapper for the Akedly OTP API. It provides a simple interface for managing OTP transactions including creation, activation, and verification using Akedly's Transaction-Based OTP Verification API.

About Akedly

Akedly is a robust authentication-as-a-service platform that offers OTP delivery pipelines for secure user verification via phone or email. This client integrates directly with their public OTP API.

Features

  • Create OTP transactions
  • Activate OTP sessions
  • Verify OTP codes
  • Lightweight with minimal dependencies (requests and python-dotenv)
  • Designed for integration into Python-based backend systems

Installation

pip install akedly-client

Configuration

This client requires three environment variables. You can load them using a .env file and python-dotenv.

Environment Variables

Create a .env file in your project root:

AKEDLY_API_URL=https://api.akedly.io/api/v1/transactions
AKEDLY_API_KEY=your_akedly_api_key_here
AKEDLY_PIPELINE_ID=your_pipeline_id_here

Important: Never commit your .env file to version control.

Usage

from akedly_client import (
    create_otp_transaction,
    activate_otp_transaction,
    verify_otp
)

# 1. Create a new OTP transaction
transaction_id = create_otp_transaction(
    phone="+201234567890",
    email="user@example.com"
)

# 2. Activate the transaction to send OTP
request_id = activate_otp_transaction(transaction_id)

# 3. Verify the OTP entered by the user
is_valid, result = verify_otp(request_id, otp="123456")

if is_valid:
    print("OTP verified successfully.")
else:
    print("Verification failed:", result)

API Reference

For detailed API documentation, please refer to:

Requirements

  • Python 3.7 or higher
  • requests
  • python-dotenv

Install dependencies:

pip install -r requirements.txt

Testing

pytest tests/

Add your test cases under tests/test_client.py.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Create a Pull Request

Disclaimer

This is an unofficial client maintained by the community. It is not affiliated with Akedly Inc., and no guarantees are provided for uptime, API changes, or SLA adherence.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

For issues related to this client, please open an issue on GitHub. For Akedly API support, please contact Akedly directly through their official channels.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akedly_client-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

akedly_client-0.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file akedly_client-0.1.1.tar.gz.

File metadata

  • Download URL: akedly_client-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for akedly_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cc8a3a3eef5427d08b0bb90d70e021fba616d2627a8f9201e10320650313c37a
MD5 8b9954089ffac3cf32b878491a9cb02c
BLAKE2b-256 9728cbed398140ba16b1f1ba6a58d2bd67cf52ed8abcfd3541936fb796c2e81c

See more details on using hashes here.

File details

Details for the file akedly_client-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: akedly_client-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for akedly_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0726ee95d2cbd63b21d94054a1f3b31d2e2388117c1fa70431d091fd9b6be019
MD5 745dd8723bfbbb731367d9d8dd6e218a
BLAKE2b-256 e11b140e56bbb87faf4a5f1e2a94fb9cc5037b55c9bd5ace58a0fb7eaba6da17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page