N
Novu15mo ago
Aman

Getting 402 error while triggering the error

Hey guys I am trying to trigger an email notification from my node js app and getting this error message "Request failed with status code 422" can someone help me figure out where I am going wrong this is what my code looks like
await novu.trigger("testing-workflow", {
to: {
subscriberId: "6375e52a452ac92da68f16e4",
},
payload: {},
});
await novu.trigger("testing-workflow", {
to: {
subscriberId: "6375e52a452ac92da68f16e4",
},
payload: {},
});
I have connected sendgrid to novu and the email triggers are working from novu when I am triggering it manually, but not from code
6 Replies
Pawan Jain
Pawan Jain15mo ago
status code 422 means unprocessable entity. Do you see any error message?
Aman
Aman15mo ago
Pawan Jain
Pawan Jain15mo ago
@._aman I see you have 0 workflows Is testing-workflow a valid workflow identifier?
Aman
Aman15mo ago
Yes i am getting this as a testing snippet from the platform
Pawan Jain
Pawan Jain15mo ago
have you triggered any notification yet? Please check again your API key In my opinion, your are using api key of other organisation
Aman
Aman15mo ago
Have triggered through the app for testing lemme check again
Want results from more Discord servers?
Add your server