---
updatedAt: 2025-09-15T21:18:43.000Z
agentTools:
  projectIndex: https://developer.trulioo.com/llms.txt
---

# v1 - Step 2: Test Authentication

Once you have the username and password for your <Glossary>NAPI</Glossary> account, you can use the [Test Authentication](https://developer.trulioo.com/reference/get_v3-connection-testauthentication) endpoint to check that they're working. The only thing you need to provide in this request is an authorization header, at shown below.  To generate the "ACCESS*TOKEN" portion of the header, combine your username and password into\_username:password* and run the resulting string through Base64 encryption.  Alternatively, you can use a program such as SOAPUI or Postman to construct the authorization header for you.

## Request

```http
GET https://api.trulioo.com/connection/v1/testauthentication
Authorization: Basic ACCESS_TOKEN
```
```csharp
//Example Username: JoeNapoli_API_Demo, Example Password: 05uZuPRCyPi!6
var truliooClient = new TruliooApiClient("JoeNapoli_API_Demo", "05uZuPRCyPi!6");
var responseString = await truliooClient.Connection
    .TestAuthenticationAsync();
```
```java
//Example Username: JoeNapoli_API_Demo, Example Password: 05uZuPRCyPi!6
ApiClient apiClient = new ApiClient();
apiClient.setUsername("JoeNapoli_API_Demo");
apiClient.setPassword("05uZuPRCyPi!6");
ConnectionApi connectionClient = new ConnectionApi(apiClient);

//testAuthentication
String testResult = connectionClient.testAuthentication();

//testAuthenticationAsync
connectionClient.testAuthenticationAsync(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. ](https://developer.trulioo.com/reference/multi-region-hosting)

## Response

```json
Hello JoeNapoli_API_Demo
```

You should receive a response containing your username, as shown above. The most common reasons for an error response are:

* The authorization header isn't set properly. It should be a <Glossary>Base64</Glossary> - encrypted <Glossary>Basic Authentication</Glossary> header.
* The spelling is incorrect.
* The wrong credentials were used.

Ensure that you are setting the authorization header correctly, using the right username/password without any typos.

> 🚧 Error Messages
>
> If you aren't receiving a successful response of the string your username visit our Error Page [here](https://developer.trulioo.com/reference/errors) to diagose.