I have a node endpoint that receives an incoming email in json, complete with any attachments from mailgun.
The attachments are in a json array (xxx.com is used for privacy)
attachments: '[{"url": "https://sw.api.mailgun.net/v3/domains/xxx.com/messages/eyJwIjpmYWxzZSwiayI6ImZhMTU0NDkwLWVmYzgtNDVlNi1hYWMyLTM4M2EwNDY1MjJlNCIsInMiOiI2NmU1NmMzNTIwIiwiYyI6InRhbmtiIn0=/attachments/0", "content-type": "image/png", "name": "ashfordchroming_logo.png", "size": 15667}]
But if i type the url in the browser:
https://sw.api.mailgun.net/v3/domains/xxx.com/messages/eyJwIjpmYWxzZSwiayI6ImZhMTU0NDkwLWVmYzgtNDVlNi1hYWMyLTM4M2EwNDY1MjJlNCIsInMiOiI2NmU1NmMzNTIwIiwiYyI6InRhbmtiIn0=/attachments/0
I get
{
"message": "Domain not found: xxx.com"
}
I wanted the simplest way to show the image attachment in HTML, I was hoping the URL would just work since mailgun store the attachment.
So I was just trying to render the url in a template from Node.
Do I need to attach auth / API key credentials to the front of the URL to do this to test and make work?