https://github.com/resend/resend-java-legacy
resend's java sdk
https://github.com/resend/resend-java-legacy
api email java sdk
Last synced: about 1 year ago
JSON representation
resend's java sdk
- Host: GitHub
- URL: https://github.com/resend/resend-java-legacy
- Owner: resend
- License: mit
- Created: 2023-01-23T21:49:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-01T11:26:38.000Z (over 2 years ago)
- Last Synced: 2025-04-06T00:33:11.161Z (about 1 year ago)
- Topics: api, email, java, sdk
- Language: Java
- Homepage: https://resend.com/docs/api-reference/concepts
- Size: 394 KB
- Stars: 14
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## SDK Installation
### Gradle
```groovy
implementation 'com.resend.api:sdk:1.5.3'
```
### Maven
```xml
com.resend.api
sdk
1.5.3
```
## Authentication
To authenticate you need to add an Authorization header with the contents of the header being Bearer re_123456789 where re_123456789 is your API Key. First, you need to get an API key, which is available in the [Resend Dashboard](https://resend.com/login).
```bash
Authorization: Bearer re_123
```
## SDK Example Usage
```java
package hello.world;
import com.resend.sdk.Resend;
import com.resend.sdk.models.shared.Security;
import com.resend.sdk.models.operations.SendEmailRequest;
import com.resend.sdk.models.operations.SendEmailResponse;
import com.resend.sdk.models.shared.Email;
public class Application {
public static void main(String[] args) {
try {
Resend.Builder builder = Resend.builder();
builder.setSecurity(
new Security() {{
bearerAuth = "Bearer YOUR_BEARER_TOKEN_HERE";
}}
);
Resend sdk = builder.build();
SendEmailRequest req = new SendEmailRequest() {{
request = new Email() {{
bcc = "bob@acme.com";
cc = "";
from = "me@acme.com";
html = "none";
replyTo = "";
subject = "hello world";
text = "first email";
to = "amy@acme.com";
}};
}};
SendEmailResponse res = sdk.email.sendEmail(req);
if (res.sendEmailResponse.isPresent()) {
// handle response
}
} catch (Exception e) {
// handle exception
}
```
## SDK Available Operations
### email
* `sendEmail` - Send an email
## Contributions
While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release !
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)