DEV Community

vishal kumar
vishal kumar

Posted on

Need help regarding mailgun api

howdy dev's
I need help related to mailgun API

curl -s --user 'api:YOUR_API_KEY' \
    https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages \
    -F from='Excited User <mailgun@YOUR_DOMAIN_NAME>' \
    -F to=YOU@YOUR_DOMAIN_NAME \
    -F to=bar@example.com \
    -F subject='Hello' \
    -F text='Testing some Mailgun awesomeness!'
Enter fullscreen mode Exit fullscreen mode

where is this '-s --user' part i have to place while requesting the post request using HTTPS core node module, can explain this in detail.

Important: I was restricted from using npm so can't use the mailgun-js module or any module,

Please Help 👽

Top comments (2)

Collapse
 
andreidascalu profile image
Andrei Dascalu

You can use the -v param with curl to see the request as it's being transformed so that you can see what --user becomes.

Collapse
 
vishal880288 profile image
vishal kumar

thanks for the help.. bro..✌