-
Notifications
You must be signed in to change notification settings - Fork 70
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
Unexpected token at 'Mailgun Magnificent API' #77
Comments
can you paste your request url, that might be the reason I guess, you migt have missed |
@rkapil12 Doesn't mailgun_rails already do that? In lib/mailgun_rails/client.rb the send_message function uses the mailgun_url which is an api_url of "https://api:#{api_key}@api.mailgun.net/v3/#{domain}" + "/messages" Edit: In testing with postman against mailgun's api, I can get it to return 'Mailgun Magnificent API' if I leave off the /messages from the url. My understanding though is that mailgun_rails is adding /message to whatever url is entered as the domain in the config file. |
So I am not sure if this fixes your issue @btkramm , but I had the same error when I was using an incorrect domain. The documentation is a little ambiguous:
The "mailgun_domain" is the domain name that you register with mailgun. Let's say you registered
you should NOT use so it will look like this:
|
Had the same issue on production. Restarting my server solved it. My guess is caching issues, and instead of pinpointing what was stale (DNS, ENVs etc...), i just restarted the whole thing. |
Ever found a solution? |
Had the same issue. It turns out I forget to source the file where the api key and domain are exported. |
Hi! I can send emails in my development environment but I can't in production. I'm getting the error: "765: unexpected token at 'Mailgun Magnificent API'"
The text was updated successfully, but these errors were encountered: