For authentication the Mailcoach API requires a logged in user through the
auth:api guard. This can be configured by changing the
Other than this, Mailcoach does nothing special regarding authentication and leaves all authentication up to your implementation needs.
Our documentation examples assume an API endpoint that is using a Bearer token for authentication
Mailcoach ships with a user endpoint to get the details of the currently logged in user.
MAILCOACH_TOKEN="your API token"
curl https://example.app/mailcoach/api/user \
-H "Authorization: Bearer $MAILCOACH_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'
As a result, you get the details of the user that this token belongs to