Mautic API > Scheduled processes

Dear all,



We’re using Mautic (for now, for some tests) and we’ve noticed that the API authentication must be done manually (by introducing user credentials in Mautic form) and then the user is redirected to the rollback URL. All this is great when the user is in front of it’s screen but by using this I think we cannot automatically manage leads based on other lead information sources by using a scheduled process.



Is there any other way to use the API (or any other Mautic feature) to create/update/add to lists leads automatically with a scheduled process and using ‘third-party’ lead information?



Thank you



Best Regards,

If you authenticate the app, Mautic will return the access token. You can use this token to access API without authentication.

Or there are easier ways to add a new lead to Mautic. Check https://medium.com/@jan_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005 and https://www.mautic.org/docs/leads/lead_monitoring.html

Thank you for your response :slight_smile:

If I didn’t misundertand, we need to save the access token and every time it expires, request a new one by using the refresh token, right? (we’re using OAuth2)

There is any way to make “Refresh token lifetime” unlimited (like zero value “0”) or should we just put a high value in days?

Thank you and keep up the great job!

I’ve never tested the unlimited option. Please try it and let us know.

Ok, with value zero “0” on “Refresh token lifetime” settings option, the refresh_token has no lifetime, it saves the current timestamp epoch (in this case 1459950493) as expires_at value of Refresh token, so we’ll have to put a high value of days to keep the scheduled process up and running without the need of Reauthotization

Thank you!

Dear all,

We’re using Mautic (for now, for some tests) and we’ve noticed that the API authentication must be done manually (by introducing user credentials in Mautic form) and then the user is redirected to the rollback URL. All this is great when the user is in front of it’s screen but by using this I think we cannot automatically manage leads based on other lead information sources by using a scheduled process.

Is there any other way to use the API (or any other Mautic feature) to create/update/add to lists leads automatically with a scheduled process and using ‘third-party’ lead information?

Thank you

Best Regards,