Quickstart
Clone an SDK, set your credentials and make a first request against the Resend API.
- 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.
bashgh repo clone OctriDev/resend-typescript-showcase-sdk cd resend-typescript-showcase-sdk ./scripts/test - Set your credentials
The quickstart reads its credentials from the environment, so nothing secret goes into source control.
bashexport API_TOKEN="..." - Make a request
The example below calls
client.domains.get(GET /domains/{domain_id}) with example values for its required arguments.tsimport { 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);