The service ID is invalid #2
-
I am using the example that you provided here. I have replaced the 'YOUR_PUBLIC_KEY' text with my public key (I even generated a new key to test if that was the issue). However, when I submit my form data I continuously get the error "FAILED... Object { status: 400, text: "The service ID is invalid. To find this ID, visit https://dashboard.emailjs.com/admin" }". I am using a free subscription but I have not even sent 1 successful email so I still have 200 in my monthly quota. How do I resolve this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I was able to resolve the issue after setting up MFA on my account. |
Beta Was this translation helpful? Give feedback.
-
@Volition42 I'm glad that you installed MFA to protect your account. If you use the official EmailJS SDK, you will most likely not have issues if your Public ID was entered correctly, without extra spaces. If you use the REST API, then probably, you did not specify the content type correctly. |
Beta Was this translation helpful? Give feedback.
-
Hi, I have the same problem, and I use the official email js SDK with React. I am 100% sure my public key is correct, but it keeps on showing that "The Public Key is invalid. To find this ID, visit https://dashboard.emailjs.com/admin/account" |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Hey! I was able to resolve it. If I remember correctly, it was because I stored my API keys in the .env and I used "" mark around it.
What I did was:
REACT_APP_PUBLIC_KEY="my_public_key"
It should be
REACT_APP_PUBLIC_KEY=my_public_key
The difference is the quotation mark around the value.
Hope this helps