forked from maxmind/ccfd-api-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTelv_Example.java
More file actions
35 lines (27 loc) · 967 Bytes
/
Copy pathTelv_Example.java
File metadata and controls
35 lines (27 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import java.util.HashMap;
import com.maxmind.ws.TelephoneVerification;
class Telv_Example {
public static void main(String args[]) {
TelephoneVerification tv;
HashMap<String, String> h = new HashMap<String, String>();
tv = new TelephoneVerification(true);
// uncomment to turn debugging on
// ccfs.debug = true;
// Set timeout to thirty seconds
tv.setTimeout(30);
// Enter your license key here
h.put("l", "YOUR_LICENSE_KEY_HERE");
// Enter your phone number here
h.put("phone", "PHONE_NUMBER_HERE");
// the verify code goes here (optional)
// h.put("verify_code","2536");
tv.input(h);
tv.query();
h = tv.output();
for (final String string : h.keySet()) {
final String key = string;
final String value = h.get(key);
System.out.println(key + " = " + value + " \n");
}
}
}