import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.apiKeys.create({ name: 'Production' });
{
"id": "dacf4072-4119-4d88-932f-6202748ac7c8",
"token": "re_c1tpEyD8_NKFusih9vKVQknRAQfmFcWCv"
}
Add a new API key to authenticate communications with Resend.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.apiKeys.create({ name: 'Production' });
{
"id": "dacf4072-4119-4d88-932f-6202748ac7c8",
"token": "re_c1tpEyD8_NKFusih9vKVQknRAQfmFcWCv"
}
full_access: Can create, delete, get, and update any resource. *
sending_access: Can only send emails.import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.apiKeys.create({ name: 'Production' });
{
"id": "dacf4072-4119-4d88-932f-6202748ac7c8",
"token": "re_c1tpEyD8_NKFusih9vKVQknRAQfmFcWCv"
}
Was this page helpful?