-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not sending transational email: HttpError: HTTP request failed #21
Comments
Facing same problem 😢 |
Hi @saurabh-antcreatives, just to let you know. My workaround was to use direct API instead of SDK: const SENDINGBLUE_API_KEY = "my-api-key";
export class SendinblueDataSource {
private axios: AxiosInstance;
constructor() {
const instance = axios.create({
timeout: 7000,
baseURL: "https://api.brevo.com/v3",
headers: {
accept: "application/json",
"api-key": SENDINGBLUE_API_KEY,
"content-type": "application/json",
},
});
this.axios = instance;
}
async sendLogMail(subject: string, message: string): Promise<void> {
const data = {
templateId: 7,
params: { subject: subject, message: message },
to: [{ email: "[email protected]", name: "Jhon Dee" }],
};
try {
await this.axios.post("/smtp/email", data);
} catch (error) {
functions.logger.warn("sendLogMaila error: " + error);
}
}
} |
hey @brunodmn |
You need to replace SENDINGBLUE_API_KEY by your brevo API KEY, if still getting unauthorized after this, replace for a new one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I received last email from my cron job running bellow snipped on April, 2, 2024 (some days ago). Now it is just not working anymore, I have not changed anything on the platform. Error message says nothing useful :
"sendLogMail error: HttpError: HTTP request failed"
.Bellow a short version of my code:
I went thru documentation, nothing about it, besides, very confusing documentation, divergent information from one page to another (github sdk readme and api guide, per instance).
As it's looking a bit messy, maybe sdk changed the way it uses underlined http api or something like it.
Anyone using TransactionalEmailsApi with same problem? Could somebody help me?
The text was updated successfully, but these errors were encountered: