Automatic device authorization
Cody can automatically open your browser to authenticate with TigerMail. No manual API key copying needed.
Start a Cody chat session in your IDE
Paste our instructions and reference relevant files
Follow the device authorization flow
Cody generates code matching your codebase style
This is an example of what Cody will generate for you.
// Cody matches your codebase patterns:
import { logger } from "@/lib/logger";
import { AppError } from "@/lib/errors";
export class EmailService {
private apiKey: string;
private baseUrl: string;
constructor() {
this.apiKey = process.env.TIGERMAIL_API_KEY!;
this.baseUrl = "https://tigermail.io";
}
async send(options: EmailOptions): Promise<EmailResult> {
try {
const response = await fetch(`${this.baseUrl}/api/v1/send`, {
method: "POST",
headers: {
"Authorization": `Bearer ${this.apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify(options),
});
if (!response.ok) {
throw new AppError("Email send failed", response.status);
}
logger.info("Email sent successfully", { to: options.to });
return response.json();
} catch (error) {
logger.error("Email error", error);
throw error;
}
}
}