Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 16 hours ago
JSON representation

resend's java sdk

Awesome Lists containing this project

README

        






Resend is the email platform for developers.






## 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 = "[email protected]";
cc = "";
from = "[email protected]";
html = "none";
replyTo = "";
subject = "hello world";
text = "first email";
to = "[email protected]";
}};
}};

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)