When trying to get account balance used api I got an exception:
IOException: Server returned HTTP response code: 401 for URL: https://api.pinnaclesports.com/v1/client/balance
Here's the code:
public void getBalance() throws Exception{
    byte[] bytes = "username:password".getBytes("UTF-8");
    String encoded = Base64.encodeBase64String(bytes);
    System.out.println(encoded);
    URL api = new URL("https://api.pinnaclesports.com/v1/client/balance");
    URLConnection apiConnection = api.openConnection();
    apiConnection.addRequestProperty("Authorization", "Basic "+encoded);
    BufferedReader in = new BufferedReader(new InputStreamReader(apiConnection.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null)
        System.out.println(inputLine);
    in.close();
}
 
     
     
    