Search code examples
phpmailgun

Mailgun: Check if a user has already subscribed


I'm using Mailgun API for sending emails in my app. I get to notice that if a user subscribes, and try to subscribe again, mailgun returns an error The parameters passed to the API were invalid. Check your inputs! showing my root directory and the line number. What I want to do is to first of all check if a user has been subscribed, before going ahead to try subscribing. How can I achieve this, please? I'm using PHP.


Solution

  • According to the mailgun api documentation you can do a request like this: GET /lists//members/