In order to test your project setup and authentication, begin by simply calling the Say Hello endpoint.
Request
GET <<endpoint>>/connection/v1/sayhello/Joe Napoli
//Example Username: JoeNapoli_API_Demo, Example Password: 05uZuPRCyPi!6
var truliooClient = new TruliooApiClient("JoeNapoli_API_Demo", "05uZuPRCyPi!6");
var responseString = await truliooClient.Connection.SayHelloAsync("Joe Napoli");
ApiClient apiClient = new ApiClient();
ConnectionApi connectionClient = new ConnectionApi(apiClient);
//sayHello
String hello = connectionClient.sayHello("Joe Napoli");
//sayHelloAsync
connectionClient.sayHelloAsync("sayHello async", new ApiCallback<String>() {
@Override
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
Logger.getLogger(SdkJavaV1Sample.class.getName()).log(Level.SEVERE, null, e);
}
@Override
public void onSuccess(String result, int statusCode, Map<String, List<String>> responseHeaders) {
System.out.println(result);
}
@Override
public void onUploadProgress(long bytesWritten, long contentLength, boolean done) {
//To change body of generated methods, choose Tools | Templates.
}
@Override
public void onDownloadProgress(long bytesRead, long contentLength, boolean done) {
//To change body of generated methods, choose Tools | Templates.
}
});
Important:
Trulioo provides multiple global and regional endpoints. Please choose the correct endpoint based on your business use case and your regulatory and compliance requirements. You can find more information on the Multi-Region Hosting page.
Response
Joe Napoli
You should receive a successful response with the value you sent in the request echoed back at you. Try sending a different string instead of "Joe Napoli" and see what happens.
Error Messages
If you aren't receiving a successful response of the string you sent as a parameter visit our Error Page for more information.