Dmitri DB
Dmitri DB

Reputation: 307

Twilio Whitepages API in python not returning data

I'm trying to use the whitepages pro lookup API and it's coming up short somehow. This is the code I've got:

    client = Client(twilio_account_sid, twilio_auth_token)
    phone_number1= client.lookups.phone_numbers("+13107042708").fetch(
            add_ons='whitepages_pro_caller_id')
    print(phone_number1.carrier)
    phone_number2 = client.lookups.phone_numbers("+17604459760").fetch(
            add_ons='whitepages_pro_caller_id')
    print(phone_number2.carrier)

It's just turning up blank data on my flask backend, None

[2019-04-16 22:25:41 +0000] [29715] [DEBUG] GET /api/confcall
2019-04-16 22:25:41.547697
[2019-04-16 22:25:41 +0000] [29715] [DEBUG] Closing connection.
None
None

Any tips? Thanks in advance, I must be doing something very obviously wrong as I'm basing this copied off of this documentation: https://www.twilio.com/docs/lookup/api?code-sample=code-get-additional-caller-information-with-lookup-and-whitepages-pro-caller-id-add-on&code-language=Node.js&code-sdk-version=3.x

Upvotes: 0

Views: 265

Answers (1)

Alan
Alan

Reputation: 10781

The documentation has been updated to fix the issue you raised, thank you for pointing that out.

Please visit:

https://www.twilio.com/docs/lookup/api?code-sample=code-get-additional-caller-information-with-lookup-and-whitepages-pro-caller-id-add-on&code-language=Python&code-sdk-version=6.x

Alan

Upvotes: 1

Related Questions