Quickstart

Clone an SDK, set your credentials and make a first request against the Resend API.

  1. Clone an SDK

    Every SDK is published as source on GitHub. Clone the one for your language and run its test script; its README lists the toolchain it needs.

    bash
    gh repo clone OctriDev/resend-typescript-showcase-sdk
    cd resend-typescript-showcase-sdk
    ./scripts/test
  2. Set your credentials

    The quickstart reads its credentials from the environment, so nothing secret goes into source control.

    bash
    export API_TOKEN="..."
  3. Make a request

    The example below calls client.domains.get (GET /domains/{domain_id}) with example values for its required arguments.

    ts
    import { Resend } from "@octridev/resend";
    
    async function main() {
      const client = new Resend({
        // Optional: replaces the default server and any server an operation declares.
        baseUrl: "https://api.resend.com",
        auth: { bearerAuth: process.env.API_TOKEN! },
      });
      const result = await client.domains.get({ domainId: "domain-1" });
      console.log(result);
    }
    
    main().catch(console.error);