Mautic Community Forums

Joomla Plug-in Error Access token parameters

Joomla Error

I have the latest version of Joomla 3.4.1 as well as have updated my plugin successfully to the most recent version (today) and now for the first time activated it. I have followed the tutorial to generate an API code, which I have done and I have generated the public and secret keys, however, when I press authorize I receive the following error code:



Error

Incorrect access token parameters returned: ???



I have double checked that I entered my site address http://pantanalexpeditions.com/administrator correctly. I added a user and I can confirm that the user isn’t added as a mautic lead as I had configured in the plug-in in Joomla.



Any ideas?

Thanks

Joomla Error
I have the latest version of Joomla 3.4.1 as well as have updated my plugin successfully to the most recent version (today) and now for the first time activated it. I have followed the tutorial to generate an API code, which I have done and I have generated the public and secret keys, however, when I press authorize I receive the following error code:

Error
Incorrect access token parameters returned: ???

I have double checked that I entered my site address http://pantanalexpeditions.com/administrator correctly. I added a user and I can confirm that the user isn’t added as a mautic lead as I had configured in the plug-in in Joomla.

Any ideas?
Thanks

HI Najatuk

I just tested it out and it seems to have worked. Can you make sure you’re using the right auth token mode?

In Mautic set it to Oauth 1 or Oauth 2, then make sure you set the plugin mode in Joomla to the same mode and save the plugin before you try to hit the authorize button. Also make sure you set the callback in Mautic before generating the tokens and in the proper mode.

I created a user on the front end and it went into Mautic properly - I’m not sure if it matters if it created from the frontend or backend of joomla, but definitely test it from the front end as that’s probably where the event is fired.

Hi Chad,
Thanks for the response. After taking your advice to look at the Oauth I remembered that I had set Oauth to Oauth2 in the Mautic interface because in the short term future I intend to convert to SSL/HTTPS… When I return to Mautic>Settings> API configurations I don’t actually see where I can change to Oauth2, but no matter. The mistake I was making in the Joomla plug-in was to change the Oauth mode from Oauth1 to Oauth2 without saving before trying to authorize, so I fooled myself into thinking I had switched the mode when I hadn’t. So, part of the problem is solved. The Joomla plug-in is now installed successfully. Send registered to leads is and was set to yes. I registered a new user in Joomla “Priya” and the user, unfortunately doesn’t show up in leads in Mautic. Joomla currrent 3.4.1 build. PHP 5.4.

When you say you created a user in the front end, I am not sure what you mean. To create a user in Joomla from the front end in pantanalexpeditions.com by clicking on client login> create new account, I need to authorize the user, and by trying to create a user there will be an email send to me, which I didn’t receive, and then it would have to go back to you to enter as a user.

Any ideas why the registered user is not showing up in leads?

Best,
Douglas

Hi Douglas

So when I say create a user in the front end I mean the process you mention of creating a user on the site instead of creating the user Joomla admin area. (users can be created in both areas).

Once you create a user in Joomla do you approve and enable the user in Joomla?

Yes, exactly on both counts, and the user is assigned automatically to “registered user”. I didn’t create the user on the backend.

Hi Najatuk

Can you look in Joomla at this file:

Joomla / logs / plg_mautic.php

It should show you what is going on - also please make sure you have ‘enable logs’ in the plugin enabled.

THe log file was already enabled and I can see:

‘ipAddress’ => ‘201.88.81.68’,
‘firstname’ => ‘Daffy’,
‘lastname’ => ‘Duck’,
‘email’ => ‘svenklusser@gmail.com’,
)
2015-04-26T15:39:14+00:00 ERROR 201.88.81.68 plg_mautic onUserAfterSave: Mautic lead was NOT successfully created. array (

-----------------------------------------------full log file---------------------------------------------------------------

#<?php die('Forbidden.'); ?>
#Date: 2015-04-26 15:39:12 UTC
#Software: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

#Fields: datetime priority clientip category message
2015-04-26T15:39:12+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave method called.
2015-04-26T15:39:12+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::isNew: true
2015-04-26T15:39:12+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::success: true
2015-04-26T15:39:12+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::send_registered: ‘1’
2015-04-26T15:39:12+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave: Send the user to Mautic.
2015-04-26T15:39:12+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::mauticUser: array (
‘ipAddress’ => ‘201.88.81.68’,
‘firstname’ => ‘Daffy’,
‘lastname’ => ‘Duck’,
‘email’ => ‘svenklusser@gmail.com’,
)
2015-04-26T15:39:14+00:00 ERROR 201.88.81.68 plg_mautic onUserAfterSave: Mautic lead was NOT successfully created. array (
'<!DOCTYPE_html>

pantanalexpeditions.com | 404 - Page Cannot Be Found

The page you are looking for cannot be found.

Similar results are provided below, or you can try another search

Search site

To find the missing content, try these steps:

  1. Visit the domain home page
  2. Reload this page
  3. Search for the missing content with the search box above

Loading...

SmartErrors powered by CloudFlarePrivacy policy

<script type="text/javascript">

CloudFlare.push(function(require, define) {

window.require = require;
window.define = define;

define.amd.jQuery = 1;

define('handlebars', ['/cdn-cgi/se/javascripts/handlebars.js'], function() {

    return Handlebars;
});

require(['cloudflare/config'], function(config) {


    if(config.zone == 'cloudflare.com') {

        var gaId = '_gaq',
            ga = window[gaId] = window[gaId] || [];

        ga.push(['_setAccount', 'UA-10218544-8']);
        ga.push(['_setDomainName', 'cloudflare.com']);
        ga.push(['_trackPageview']);

        (function() {
            var gs = document.createElement('script'); gs.type = 'text/javascript'; gs.async = true;
            gs.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www')   '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gs, s);
        })();
    }
});

require.paths.smarterror =
require.paths.backbone =
require.paths.underscore =
require.paths.handlebars =
require.paths.jquery = '/cdn-cgi/se/javascripts';

require(['smarterror']);

});



', ), ) 2015-04-26T15:53:29+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave method called. 2015-04-26T15:53:29+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::isNew: false 2015-04-26T15:53:29+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::success: true 2015-04-26T15:53:29+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::send_registered: '1' 2015-04-26T15:53:29+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave: Do not send the user to Mautic. 2015-04-26T15:54:11+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave method called. 2015-04-26T15:54:11+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::isNew: false 2015-04-26T15:54:11+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::success: true 2015-04-26T15:54:11+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::send_registered: '1' 2015-04-26T15:54:11+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave: Do not send the user to Mautic. 2015-04-26T16:10:57+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave method called. 2015-04-26T16:10:57+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::isNew: false 2015-04-26T16:10:57+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::success: true 2015-04-26T16:10:57+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave::send_registered: '1' 2015-04-26T16:10:57+00:00 INFO 201.88.81.68 plg_mautic onUserAfterSave: Do not send the user to Mautic. 2015-04-26T18:34:10+00:00 INFO 201.88.81.68 plg_mautic Authorize method called. 2015-04-26T18:34:12+00:00 ERROR 201.88.81.68 plg_mautic Incorrect access token parameters returned: ??? 2015-04-26T18:35:41+00:00 INFO 201.88.81.68 plg_mautic Authorize method called. 2015-04-26T18:35:42+00:00 ERROR 201.88.81.68 plg_mautic Incorrect access token parameters returned: ??? 2015-04-26T18:36:15+00:00 INFO 201.88.81.68 plg_mautic Authorize method called. 2015-04-26T18:37:01+00:00 INFO 201.88.81.68 plg_mautic Authorize method called. 2015-04-26T18:37:01+00:00 ERROR 201.88.81.68 plg_mautic Incorrect access token parameters returned: ??? 2015-04-26T18:40:43+00:00 INFO 201.88.81.68 plg_mautic Authorize method called. 2015-04-26T18:40:45+00:00 ERROR 201.88.81.68 plg_mautic Incorrect access token parameters returned: ??? 2015-04-26T18:50:55+00:00 INFO 201.88.81.68 plg_mautic Authorize method called. 2015-04-26T18:50:57+00:00 ERROR 201.88.81.68 plg_mautic Incorrect access token parameters returned: ??? -------------------------------end log file-------------------------------------------------------- any suggestions?

The cloudflare output in the middle of that stream is really odd. It might be that cloudlfare is somehow sending out a duplicate IP address and thus mautic thinks all the leads are the same. Can you try the following:

  1. Turn off cloudflare for a test. It’s gotta be ‘really off’, not just the dev mode.
  2. Make sure the email address is unique in Mautic and in Joomla
  3. Make sure you test from a unique IP address - maybe try a proxy or something when you register the Joomla account.

In regard to Chad’s remark about duplicate IP addresses, if you’re using Cloudflare on your Joomla! website you should install the Cloudflare plugin.
It makes sure you get the visitors IP address instead of the cloudflare IP addresses.

More info and a detailed guide here: https://support.cloudflare.com/hc/en-us/articles/201997250-CloudFlare-and-Joomla-Recommended-First-Steps

Download the Cloudflare extension for Joomla! from the JED:
http://extensions.joomla.org/extensions/extension/core-enhancements/performance/cloudflare