Example Fails
ggblake opened this issue · 1 comments
ggblake commented
Trying to use Java API. What is th partner key?
I alos get NoClassDefFound: okio/Source
amitsendinblue commented
partner-key is used for partner users, use can ignore this and please refer the Reference Document which has all the example for JAVA language, I am sharing one example below for ex:
import sendinblue.ApiClient;
import sendinblue.Configuration;
import sendinblue.auth.ApiKeyAuth;
import sibModel.*;
public class Program {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
AccountApi api = new AccountApi();
try {
GetAccount response = api.getAccount();
System.out.println(response.toString());
} catch (Exception e) {
System.out.println("Exception occurred:- " + e.getMessage());
}
}
}