• Correct WhatsUp

 

Hello. I keep getting an error:

TwilioRestException: HTTP 400 error: Unable to create record: The StatusCallback URL whatsapp:+15017122661 is not a valid URL.
 send_message, 12
 <module>, 15

What could be the reason? My code:

from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
ACCOUNT_SID = 'AC44be2cb71ec573f32cb6292ee578b043'
AUTH_TOKEN = '55c0fac9e0bfa5580fc4ac850f2dc62d'

def send_message(sender, to, body):
    body = body.capitalize()
    if not body.endswith(('.','!','?')):
        body += '.'
    client = Client(ACCOUNT_SID, AUTH_TOKEN)
    message = client.messages.create(body,sender, to)
if __name__ == '__main__':
    # These "asserts" are used for self-checking and not for an auto-testing
    send_message('whatsapp:+15017122661', 'whatsapp:+15017122662', 'Hi!')
    print("Coding complete? Click 'Check' to earn cool rewards!")
8