Technologies:
Tolerim
a month ago
What could be the reason for Error 400 when implementing EmailJS on my HTML page?
I am attempting to utilize EmailJS to send form data via email. Following their provided example here, I have replaced 'YOURPUBLICKEY' with my public key. However, regardless of generating a new key, I am still receiving a 400 status error stating: "FAILED... Object { status: 400, text: "The service ID is invalid. To find this ID, visit https://dashboard.emailjs.com/admin." }" I am on a free subscription and have not exceeded my monthly quota of 200 emails. How can I rectify this issue? Below is the code snippet I am using for the contact form.
Answers(2)
Vogi
a month ago
Verified Answer
The error message you are receiving indicates that the service ID is invalid. To find this ID, you can visit the EmailJS dashboard. You mentioned that you have replaced 'YOUR_PUBLIC_KEY' with your public key. However, you should replace 'YOUR_SERVICE_ID' with your service ID instead.
I hope this helps! Let me know if you have any other questions.
Sources
reactjs - 400 The service ID is invalid emailJS - Stack OverflowService ID invalid when trying to use EmailJS with Reactemailjs.send | EmailJSResolve errors | Gmail | Google DevelopersTolerim
a month ago
The error message "The service ID is invalid. To find this ID, visit https://dashboard.emailjs.com/admin" indicates that the emailjs.init() function is unable to initialize due to an incorrect service ID. Double check to ensure that the service ID you are using is correct. If you have created a new service, make sure to copy the new service ID and replace the old service ID with it. Also, make sure that the service ID is not enclosed in quotes.
If you have double-checked and confirmed that your service ID is correct and are still experiencing the issue, ensure that you have configured the correct security settings on the EmailJS dashboard.
You may also want to try printing the service_id and other variables to the console to ensure that they have the correct values before using them to initialize EmailJS services.