Skip to contentSkip to navigationSkip to topbar
On this page

Testing SMS Pumping Risk with Magic Numbers


(warning)

Warning

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(link takes you to an external page) before testing phone numbers.


SMS Pumping Risk Magic Numbers

sms-pumping-risk-magic-numbers page anchor

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.

Below are the Phone Numbers for SMS Pumping Risk Score, along with their Inputs/Outputs:

below-are-the-phone-numbers-for-sms-pumping-risk-score-along-with-their-inputsoutputs page anchor

These phone number examples show different types of SMS Pumping Risk Scores.

Phone NumberCarrierRiskCategoryNumberBlockedNumberBlockedDateNumberBlockedLast3MonthsSMSPumpingRiskScore
+441234567890highfalse"2023-07-20T17:10:17Z"true2
+911234567890lowfalsenullnull2
+621234567890highfalse"2023-07-12T17:03:13Z"true44
+921234567890highfalsenullnull40
+441234567891hightrue"2023-09-06T03:44:21Z"true34
+911234567891hightrue"2023-09-05T01:23:57Z"true36
+621234567891hightrue"2023-09-06T17:06:32Z"true44
+921234567891hightrue"2023-09-05T17:10:13Z"true34

These phone number examples show different types errors when using SMS Pumping Risk.

Phone NumberError Code
+44123456789260003
+44123456789360600
+44123456789460601
+44123456789560606
+44123456789660608
+44123456789760613
SMS Pumping Risk LookupLink to code sample: SMS Pumping Risk Lookup
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchPhoneNumber() {
11
const phoneNumber = await client.lookups.v2
12
.phoneNumbers("+447772000001")
13
.fetch({ fields: "sms_pumping_risk" });
14
15
console.log(phoneNumber.smsPumpingRisk);
16
}
17
18
fetchPhoneNumber();

Output

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": null
22
},
23
"phone_number_quality_score": null,
24
"pre_fill": null,
25
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"
26
}