Nylas Java SDK
This is the GitHub repository for the Nylas Java SDK and this repo is primarily for anyone who wants to make contributions to the SDK or install it from source. If you are looking to use Java to access the Nylas Email, Calendar, or Contacts API you should refer to our official Java SDK Quickstart Guide.
Here are some resources to help you get started:
- Nylas SDK Tutorials
- Get Started with the Nylas Communications Platform
- Sign up for your Nylas developer account.
- Nylas API Reference
If you have a question about the Nylas Communications Platform, please reach out to [email protected] to get help.
Note: The Nylas Java SDK requires Java 8 or above.
Setup via Gradle: If you're using Gradle, add the following to your dependencies section of build.gradle:
Setup via Maven: For projects using Maven, add the following to your POM file:
<dependency> <groupId>com.nylas.sdk</groupId> <artifactId>nylas-java-sdk</artifactId> <version>1.13.1</version> </dependency>
Build from source: To build from source, clone this repo and build the project with Gradle.
git clone https://github.com/nylas/nylas-java.git && cd nylas-java ./gradlew build
This will create a new jar file in the
To use this SDK, you first need to sign up for a free Nylas developer account.
Then, follow our guide to setup your first app and get your API access keys.
For code examples that demonstrate how to use this SDK, take a look at our Java SDK Quickstart Guide.
The SDK uses SLF4J for logging. Applications using the SDK can choose what logging framework to use with it. Common choices are log4j, logback, java.util.logging. If the application doesn't specify any logging framework, then SLF4J will emit one warning and then be completely silent.
By default, the HTTP client is configured with the
which provides 3 loggers for HTTP requests that only log at DEBUG level.
com.nylas.http.Summarylogs one line for each request, containing method, URI, and content size and one line for each response containing status code, message, content size and duration.
com.nylas.http.Headerslogs the request and response HTTP headers (except Authorization value by default).
com.nylas.http.Bodylogs request and response bodies (first 10kB by default).
Enabling or disabling those loggers is done via the logging framework being used.
For example, if using log4j2 and with an xml configuration file, include this line to enable all three:
<Logger name="com.nylas" level="DEBUG"/>
Configuring the logging of the HTTP Authorization header values and the body size limit can be done by using a
NylasClient.Builder with a customized
Please refer to Contributing for information about how to make contributions to this project. We welcome questions, bug reports, and pull requests.
This project is licensed under the terms of the MIT license. Please refer to LICENSE for the full terms.