Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/resend/resend-java-legacy
- Owner: resend
- License: mit
- Created: 2023-01-23T21:49:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-01T11:26:38.000Z (11 months ago)
- Last Synced: 2024-04-16T05:06:59.457Z (7 months 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 = "[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
* `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)