Socket
Socket
Sign inDemoInstall

turn-python

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    turn-python

A python package for the Turn.io WhatsApp API


Maintainers
1

Readme

turn-python

  • Turn API documentation
  • WhatsApp Business API

Usage

  1. Get an API token from Turn (currently only tokens are supported, not username / passwords)

  2. Add this as an environment variable, or pass in to the turn client

    $ export TURN_AUTH_TOKEN={your token}
    
  3. Usage

    from turn import TurnClient
    
    turn_client = TurnClient(token={optionally add your token here})
    
    # Get a user's whatsapp id
    wa_id = turn_client.contacts.get_whatsapp_id('123456')
    
    # Send a message
    turn_client.messages.send_text(wa_id, 'Hello')
    

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc