![JAR search and dependency download from the Maven repository](/logo.png)
com.telesign.ScoreClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of TeleSign-SDK Show documentation
Show all versions of TeleSign-SDK Show documentation
The TeleSign Java SDK is a Java library that provides an interface to TeleSign Web Services. TeleSign Web Services conform to the REST Web Service Design Model. Services are exposed as URI-addressable resources through the set of RESTful procedures in our TeleSign REST API.
The newest version!
package com.telesign;
import java.io.IOException;
import java.net.Proxy;
import java.security.GeneralSecurityException;
import java.util.HashMap;
import java.util.Map;
/**
* Score provides risk information about a specified phone number.
*/
public class ScoreClient extends RestClient {
private static final String SCORE_RESOURCE = "/v1/score/%s";
public ScoreClient(String customerId, String apiKey) {
super(customerId, apiKey);
}
public ScoreClient(String customerId, String apiKey, String restEndpoint) {
super(customerId, apiKey, restEndpoint);
}
public ScoreClient(String customerId,
String apiKey,
String restEndpoint,
Integer connectTimeout,
Integer readTimeout,
Integer writeTimeout,
Proxy proxy,
final String proxyUsername,
final String proxyPassword) {
super(customerId, apiKey, restEndpoint, connectTimeout, readTimeout, writeTimeout, proxy, proxyUsername, proxyPassword);
}
/**
* Score is an API that delivers reputation scoring based on phone number intelligence, traffic patterns, machine
* learning, and a global data consortium.
*
* See https://developer.telesign.com/docs/score-api for detailed API documentation.
*/
public TelesignResponse score(String phoneNumber, String accountLifecycleEvent, Map params) throws IOException, GeneralSecurityException {
if (params == null) {
params = new HashMap<>();
}
params.put("account_lifecycle_event", accountLifecycleEvent);
return this.post(String.format(SCORE_RESOURCE, phoneNumber), params);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy