# API without logging in?

**URL:** https://forum.mautic.org/t/api-without-logging-in/5596
**Category:** Product Support
**Created:** [March 28, 2016, 11:14pm UTC](https://forum.mautic.org/t/api-without-logging-in/5596 "2016-03-28T23:14:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![glennblues](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/glennblues/32/929_2.png) [@glennblues](https://forum.mautic.org/u/glennblues)
#### Post date: [March 28, 2016, 11:14pm UTC](https://forum.mautic.org/t/api-without-logging-in/5596/1 "2016-03-28T23:14:55Z")

</div>

I was just about to purchase Sendy or MailWizz, but then I came across Mautic. Yeah!  
  
  
  
I’m working on an integration with the S2member WordPress plugin. This allows me to send a notification to my own app upon payment, etc. and I currently already use that functionality for other purposes. S2member also allows users to opt-in to a mailing list and they integrate with MailChimp, etc. automatically, but I’m working on writing my own integration for Mautic. More information about the S2member side is here: [https://s2member.com/kb-article/building-an-api-notification-handler-webhook/](https://s2member.com/kb-article/building-an-api-notification-handler-webhook/)  
  
  
  
I’ve got all the fields I need, am ready to send the data over to Mautic, and followed the tutorial here: [http://johnlinhart.com/blog/implementing-mautic-api](http://johnlinhart.com/blog/implementing-mautic-api)  
  
  
  
The problem is that this code will run in the background and Oath 1a is asking me to login. Is there a way to do this without logging in? The basic process I want is this:

1. User signs up using S2member and opts-in or not.  
2. S2member sends a notification to itself at another URL  
3. That URL checks to see if the user that just paid opted-in  
4. If the user opted-in then it adds the user to the list on the Mautic site.  
  
  
  
I’m pretty sure I’ve found all the API docs I need to add the lead and add the lead to a list, but it’s the authentication where I’m stuck since I’ve never used OAth before. Is there a way to just use the keys?

---

<div class="post-metadata">

### Author: ![glennblues](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/glennblues/32/929_2.png) [@glennblues](https://forum.mautic.org/u/glennblues)
#### Post date: [March 28, 2016, 11:14pm UTC](https://forum.mautic.org/t/api-without-logging-in/5596/2 "2016-03-28T23:14:55Z")

</div>

I was just about to purchase Sendy or MailWizz, but then I came across Mautic. Yeah!

I’m working on an integration with the S2member WordPress plugin. This allows me to send a notification to my own app upon payment, etc. and I currently already use that functionality for other purposes. S2member also allows users to opt-in to a mailing list and they integrate with MailChimp, etc. automatically, but I’m working on writing my own integration for Mautic. More information about the S2member side is here: [https://s2member.com/kb-article/building-an-api-notification-handler-webhook/](https://s2member.com/kb-article/building-an-api-notification-handler-webhook/)

I’ve got all the fields I need, am ready to send the data over to Mautic, and followed the tutorial here: [http://johnlinhart.com/blog/implementing-mautic-api](http://johnlinhart.com/blog/implementing-mautic-api)

The problem is that this code will run in the background and Oath 1a is asking me to login. Is there a way to do this without logging in? The basic process I want is this:

1. User signs up using S2member and opts-in or not.
2. S2member sends a notification to itself at another URL
3. That URL checks to see if the user that just paid opted-in
4. If the user opted-in then it adds the user to the list on the Mautic site.

I’m pretty sure I’ve found all the API docs I need to add the lead and add the lead to a list, but it’s the authentication where I’m stuck since I’ve never used OAth before. Is there a way to just use the keys?

---

<div class="post-metadata">

### Author: ![glennblues](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/glennblues/32/929_2.png) [@glennblues](https://forum.mautic.org/u/glennblues)
#### Post date: [March 29, 2016, 7:14pm UTC](https://forum.mautic.org/t/api-without-logging-in/5596/3 "2016-03-29T19:14:53Z")

</div>

Thanks. I ended up going with this: [https://medium.com/@jan\_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005#.do3gs63de](https://medium.com/@jan_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005#.do3gs63de)
