Please review the Magic Numbers for Lookup and use your testing credentials for the correct Region when testing phone numbers. If you use your production credentials then the phone numbers do not display the correct responses shown below.
Note: Your testing credentials are region specific so make sure you have selected the region you want to test in the top right corner of the Auth Tokens page of your Console before testing phone numbers.
These phone numbers have simulated information for the following inputs which is for testing the SMS Pumping Risk feature. Testing SMS Pumping Risk Score with Magic Numbers works just like SMS Pumping Risk in production, and only requires you to submit the phone number with your query.
Note: These phone numbers are examples only and do not include real time data.
These phone number examples show different types of SMS Pumping Risk Scores.
Phone Number | CarrierRiskCategory | NumberBlocked | NumberBlockedDate | NumberBlockedLast3Months | SMSPumpingRiskScore |
---|---|---|---|---|---|
+441234567890 | high | false | "2023-07-20T17:10:17Z" | true | 2 |
+911234567890 | low | false | null | null | 2 |
+621234567890 | high | false | "2023-07-12T17:03:13Z" | true | 44 |
+921234567890 | high | false | null | null | 40 |
+441234567891 | high | true | "2023-09-06T03:44:21Z" | true | 34 |
+911234567891 | high | true | "2023-09-05T01:23:57Z" | true | 36 |
+621234567891 | high | true | "2023-09-06T17:06:32Z" | true | 44 |
+921234567891 | high | true | "2023-09-05T17:10:13Z" | true | 34 |
These phone number examples show different types errors when using SMS Pumping Risk.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchPhoneNumber() {11const phoneNumber = await client.lookups.v212.phoneNumbers("+447772000001")13.fetch({ fields: "sms_pumping_risk" });1415console.log(phoneNumber.smsPumpingRisk);16}1718fetchPhoneNumber();
1{2"calling_country_code": "1",3"country_code": "US",4"phone_number": "+447772000001",5"national_format": "(415) 992-9960",6"valid": true,7"validation_errors": [],8"caller_name": null,9"sim_swap": null,10"call_forwarding": null,11"line_status": null,12"line_type_intelligence": null,13"identity_match": null,14"reassigned_number": null,15"sms_pumping_risk": {16"carrier_risk_category": "moderate",17"number_blocked": false,18"number_blocked_date": null,19"number_blocked_last_3_months": null,20"sms_pumping_risk_score": 61,21"error_code": null22},23"phone_number_quality_score": null,24"pre_fill": null,25"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"26}