Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

231
Vistas
AttributeError: 'module' object has no attribute 'TwilioRestClient'

Trying to integrate django 1.10 application with twilio 6.0.0 and django-twilio==0.8.0

referring link showing Error in my shell..

7 def send_twilio_message(to_number, body):
----> 8     client = twilio.rest.TwilioRestClient(
      9         settings.TWILIO_ACCOUNT_SID, settings.TWILIO_AUTH_TOKEN)
     10 

AttributeError: 'module' object has no attribute 'TwilioRestClient'
about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Updated with the solution:
version twilio==6.0.0 (current one ) has different directory structure,so it effect importing structure
Below is the updated importing structure ..

from django.conf import settings

import twilio
import twilio.rest

from twilio.rest import Client 

def send_twilio_message(to_number, body):
    client = Client(settings.TWILIO_ACCOUNT_SID, settings.TWILIO_AUTH_TOKEN)

    return client.api.account.messages.create(
        body=body,
        to=to_number,
        from_=settings.PHONE_NUMBER
    ) 
about 4 years ago · Santiago Trujillo Denunciar

0

The tutorial you are following was written for an older version of the twilio sdk than 6.0.

You could try to look for a newer tutorial to follow, or you could try to adjust the tutorial. The migration guide might help with this.

You final option is to install an older, unsupported version of the twilio library that works with the tutorial, e.g.

pip install twilio==5.7
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda