This may have been asked already in the thread, but I can’t seem to find it. I’m trying to integrate my mautic account with gravity forms, but whenever I try and connect the two I’m getting a “Lost by chance?” message. I’ve already tried this on auth 1 and auth 2, any other recommendations I could try to sync these up?
Installed API package from github to my site’s root, the /lib/ folder is now in my site’s root, I’m not sure if I have api package installed in correct place that might be the problem? I unzipped packaged and put everything in my root folder.
I enabled API and created keys
I know I’m doing it right because my test site at the on demand version at mautic.net works that I setup to test, it’s just my self hosted site isn’t talking to zapier plugin correctly?
@kinnaert is everything else working correctly with you self-hosted Mautic instance? It could be that the data isn’t getting passed through correctly from your webserver to PHP…
You shouldn’t need the API library you mention as it is actually an example of how to use the Mautic API not the API itself. Adding the API library to the root folder of Mautic should do nothing but it may be causing some problems so removing it would be best.
I’ve upgraded our instance to Mautic v2.1.1 and OAuth v1 still seems to be an option. On the “API credentials” page on settings there is the dropdown below
Ensure that OAuth V2 is selected when creating and editing the credentials… and that OAuth V2 is selected when you are on this page
If you are editing the Mautic credential while trying to connect you will run into errors.
I’ve just gone through the setup process and the flow from our server logs is as follows.
Go through Zapier setup,
Zapier makes a GET request to /oauth/v2/authorize?response_type=code&client_id=8_4dwq6m556yo044ss4ss80gwsgdfsgfsdgcwscco808cg48co48sgs&redirect_uri=https%3A//zapier.com/dashboard/auth/oauth/return/App43460API/&state=1472578687687264.2287552 at a address like so which Mautic then returns a 302.
Zapier then does a POST to /oauth/v2/token?client_secret=13du3duehbv4cs48o044osfgfsgs4k0ggsg8os4og0gsg0gwkok&code=MWYwZjgyMjY4ZkljlkjlkZDI4N2U5NTIzM2RiN2ZkYmJlMWFlZGRjYzUyYTQzNDkxYmJlOWMwMDY2ZmQzODQxNGViNA&grant_type=authorization_code&client_id=8_4dwq6m556yo044ss4ss80gwdsafdasfwcwscco808cg48co48sgs&redirect_uri=https%3A%2F%2Fzapier.com%2Fdashboard%2Fauth%2Foauth%2Freturn%2FApp43460API%2F HTTP/1.1 which returns a 400
and then it works as expected. I’ve modified the client secret and id in case anyone worries.
The fact that the API example library doesn’t work likely means that it is a hosting problem which is not related to the Zapier integration and will likely take some debugging on you part to work out.
Also having a similar issue. Seems to be able to get to the last stage but getting
“{“error”:“redirect_uri_mismatch”,“error_description”:“The redirect URI provided does not match registered URI(s).”}” when going to the …/oauth/v2/authorize stage.
@kinnaert , sorry my previous reply didn’t get posted for some reason. The 403 problem is probably due to a configuration problem, when Mautic receives a request which it considers invalid it sends back a 403. Doublecheck that you have setup and enabled OAuth V2 not V1, there is a guide here https://medium.com/@zpetterd/getting-mautic-cooperating-with-zapier-3267bd2e72ea#.pcj9jcp7a . There is 40 other people using the integration without problems…
Just a heads up to anyone looking to help out; the Zapier integration can’t be made public until REST webhooks are integrated into Mautic. If anyone is interested in get it going have a look at the feature request here https://github.com/mautic/mautic/issues/1591
[quote=15110:@zpetterd]@kinnaert , sorry my previous reply didn’t get posted for some reason. The 403 problem is probably due to a configuration problem, when Mautic receives a request which it considers invalid it sends back a 403. Doublecheck that you have setup and enabled OAuth V2 not V1, there is a guide here https://medium.com/@zpetterd/getting-mautic-cooperating-with-zapier-3267bd2e72ea#.pcj9jcp7a . There is 40 other people using the integration without problems…
Hi I found your article, we followed directions, but not luck still?
So when we go to API configuration in settings, there is no longer an option to select OAuth versions, I saw a screen shot someone else posted where you could select between the two, no such option exists now, I’m using version 2.1.1
here’s a screenshot, where is option to select OAuth2? Also is it not required to install API library package, your instructions don’t mention installing it, other mautic blog articles and forum posts say you need api packaged /lib/ folder installed for API to work, which is it? I’m guessing the option to select OAuth version has been removed and now happens automatically, the only option I see is when you create a key pair you can select version there, other then that there’s no other setting in configuration to select version?
Hi Paul, thanks for the reply but we’re beyond basic settings for API at this point, it’s “easy” to configure and make keys, we figured that out in the first few minutes of trying to get API working, but it’s giving errors, myself and other programmer are trying to troubleshoot why we’re getting this HTTP 403 error, we’ve install the API library package and all our settings are 100% correct as we’ve connected from mautic.net test site to zapier, something is different apparently between community edition and on demand version or we’d not be having this problem.
We’re using PHP 5.6
Shared hosting
we’ve looked at tweaking .htaccess, and php.ini to no avail
we’ve setup apitester and seems to be working but even the tester seems to have issues so no idea what’s going on there
we’re using version 2.1.1 and all we’ve done is install api library package and configured all the settings like you did in the video, but still getting 403 error?
He was[quote=15159:@MxyzptlkFishStix]Has nothing to do with any of that stuff. You don’t even have to install the API library. You have the wrong callback url entered. Reread zpetterd’s last post again.[/quote]
Issue resolved, Thanks for all the help, ended up being was hosting company hostgator their shared hosting account have enabled mod_security or something like it that was blocking the redirect back to zapier. We figured it by install mautic on other host and it worked. So annoyed with hostgator for having this enabled but not listing in php info and not having it write to any of our log files, or sending us an email alert or something. Wasted so much time troubleshooting this.
We are trying to use zapier to add a contact to a segment however we are getting the following error:
Bargle. We hit an error creating a a contact to a segment. Error:
*****.mautic.net returned (404) Not Found and said “The page you’re looking for could not be found”
thanks for the amazing work you are all doing. Just to report another issue faced.
I am trying to set a webhook as per zapier’s instructions to send a lead to the CRM once a form been filled. After setting it up and sending a test pay load or submit a form manually, zapier isn’t detecting any of it.