GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - reloop-labs/reloop-java

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Reloop Java SDK

Official Java client for the Reloop API.

Before you send

  1. API key — create one in your Reloop account
  2. Verified domain — add and verify a sending domain; use it in the from address

Full API reference: reloop.sh/docs

Install

<dependency>
  <groupId>sh.reloop</groupId>
  <artifactId>reloop-java</artifactId>
  <version>2.0.0</version>
</dependency>

Quick start

import sh.reloop.ReloopClient;
import sh.reloop.exceptions.ReloopApiException;
import sh.reloop.exceptions.ReloopValidationException;
import sh.reloop.models.MailModels.SendMailParams;
import sh.reloop.models.MailModels.SendMailResponse;

public class Example {
    public static void main(String[] args) {
        ReloopClient client = new ReloopClient("rl_your_api_key_here");

        SendMailParams params = new SendMailParams();
        params.from = "Reloop <[email protected]>";
        params.to = "[email protected]";
        params.subject = "Welcome to Reloop";
        params.html = "<p>Thanks for signing up.</p>";
        params.text = "Thanks for signing up.";

        try {
            SendMailResponse result = client.mail.send(params);
            System.out.println(result.messageId + " " + result.id);
        } catch (ReloopValidationException e) {
            System.err.println("invalid request (" + e.getField() + "): " + e.getMessage());
        } catch (ReloopApiException e) {
            System.err.println("API error " + e.getStatus() + ": " + e.getMessage());
        }
    }
}

Services

client.apiKey;    // create, list, get, update, delete, rotate, enable, disable
client.mail;      // send
client.domain;    // create, list, get, update, delete, verify
client.contacts;  // CRUD + .properties, .groups, .channels
client.webhook;   // CRUD, pause/enable/disable, trigger, deliveries + verify
client.inbox;     // .mailboxes, .messages, .threads

Errors

Kind Type When
Bad client args ReloopValidationException Invalid params — no HTTP call
HTTP / network ReloopApiException Non-2xx response or transport failure
Webhook HMAC WebhookSignatureException Local signature verification failed

Idiomatic Java exceptions — the Java equivalent of Node/Python Result objects and Go (T, error).

Webhook verification

import sh.reloop.services.WebhookVerify;

// payload: the raw request body; signature: the Reloop-Signature request header
var event = WebhookVerify.constructEvent(payload, signature, secret, 300);
// or client.webhook.verify(params)

// event.type, event.createdAt, event.data

License

Licensed under the Apache License 2.0 with additional use restrictions from Reloop Labs (same as the Reloop project).

About

No description, website, or topics provided.

Resources

Readme
License

Contributing

Contributing
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.