complete API failure.
See original GitHub issueThe docs here state to use the ‘url’ if in the EU (why? why can’t this be handled on their end, or in the library?), but the url doesn’t match the one I’m given on the mailgun site.
Do I use https://api.eu.mailgun.net
, per the docs here? Doesn’t seem to work, get a 401.
Or https://api.eu.mailgun.net/v3
, per the docs on the mailgun area in a few places? Get a JSON parsing error from inside the minified library.
Or https://api.eu.mailgun.net/v3/<my-site,-yes-actually-my-real-site>.com
, an attempt to extract the pattern from a curl example for the sandbox URL? Nope, JSON error. without v3? Still a JSON error.
What even is this guessing game? Some people are going back and giving up and just using the old deprecated library from 2018?? I wish I could–I tried, on accident, since the website’s docs erroneously point to the wrong lib (as pointed out in the issues here repeatedly–how is that not fixed yet?)
I don’t know if the old non-official one is able to work with EU, and I’m guessing not–just fails without a descriptive error for me.
On the other hand, I can’t get this one to work either.
On the other hand, I can’t even get a curl example to work with the eu endpoints. I finally finangled enough with a curl request to get it to not throw an error, but I just get stdout that says ‘Mailgun Magnificent API’… huh? No email received, and no email recorded as sent in the dashboard?
wtf?
Really feeling let down, I’ve never had such a bad API experience, honestly. It’s kind of shocking, for a company that purported to do one simple thing well for developers, for one of the single biggest web technologies out there.
Now the question is, is it possible for me to authenticate on the old API and I’m just doing something wrong, or is there really just no API option?
What a disappointment. 😕
I’ve got an extremely tight deadline, and this was the last stage. I really expected this to go more smoothly.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:6 (1 by maintainers)
Top GitHub Comments
For the next poor soul, this works locally as well as from heroku (including having actually received the email to my inbox, from the custom domain, from an eu domain).
Don’t do this at home, unless you’re up at 6am having pulled an all nighter to get a feature out the door, etc., etc.:
This is completely self contained, don’t even need to
npm install
anything. Just add the vars, and copy paste.Would love to see a better solution, but that’ll get me through for now. I’m feeling like there was an upgrade to the v3 api in the last 48 hours and I just happen to arrive on the scene at the wrong time or something.
@kylebakerio I ended up needing to do the same thing. but for a non eu domain. took a different route though. https://github.com/mailgun/mailgun-js/issues/118#issuecomment-847792631. It stays out of the exec call and does it through node-fetch.