Mautic Community Forums

Cannot Authorize Mautic Joomla Plugin

When trying to authorize the Joomla Mautic Plugin, I receive the following error message:



Error

Incorrect access token parameters returned: Array



The Public Key, and Secret Key have been created in Mautic and entered in the plugin and re-checked; the OAuth version has been set to the same setting as Mautic.



Please, advice at your earliest convenience. Thank you in advance.

When trying to authorize the Joomla Mautic Plugin, I receive the following error message:

Error
Incorrect access token parameters returned: Array

The Public Key, and Secret Key have been created in Mautic and entered in the plugin and re-checked; the OAuth version has been set to the same setting as Mautic.

Please, advice at your earliest convenience. Thank you in advance.

Could you try my version of the plugin?

https://github.com/escopecz/mautic-joomla

There is Download button in the right hand column. Let me know if that work. I’ll send pull request to official plugin then.

Escopecz,

I downloaded the plugin from the link you suggested and installed it (today 2015-09-17). After clicking ‘Authorise’ it does not throw an error however it does not give an indication whether it authorised successfully either. The following is the log entries at the moment:

2015-09-16T14:39:47+00:00 ERROR #.#.#.# plg_mautic Incorrect access token parameters returned: ???
2015-09-16T14:39:45+00:00 INFO #.#.#.# plg_mautic Authorize method called.
2015-09-16T14:37:16+00:00 ERROR #.#.#.# plg_mautic Incorrect access token parameters returned: ???
2015-09-16T14:37:15+00:00 INFO #.#.#.# plg_mautic Authorize method called.
2015-09-16T14:36:06+00:00 ERROR #.#.#.# plg_mautic Incorrect access token parameters returned: ???
2015-09-16T14:36:02+00:00 INFO #.#.#.# plg_mautic Authorize method called.
2015-09-14T15:24:49+00:00 ERROR #.#.#.# plg_mautic Incorrect access token parameters returned: Array
2015-09-14T15:24:47+00:00 INFO #.#.#.# plg_mautic Authorize method called.
2015-09-14T15:23:37+00:00 INFO #.#.#.# plg_mautic Authorize method called.
2015-09-14T14:15:09+00:00 ERROR #.#.#.# plg_mautic Incorrect access token parameters returned: Array

I suspect it may have to do with CloudFlare caching?

If you could turn it off for a test, we could know more.

(1) I have excluded the myjoomla.com/administrator from CloudFlare it still does not work properly after uploading your plugin.

(2) Now paused the CloudFlare service and click on ‘Authorise’ log show the following:
2015-09-16T16:00:27+00:00 ERROR #.#.#.# plg_mautic Incorrect access token parameters returned: ???
2015-09-16T16:00:21+00:00 INFO #.#.#.# plg_mautic Authorize method called.

The response from Mautic goes to myjoomla.com (using your example). Not to administrator section.

Ok I made a modification as follows to the configuration:
array (
‘baseUrl’ => ‘http://www.myjoomla.com/mautic’,
‘version’ => ‘OAuth1a’,
‘clientKey’ => ‘fakdfae334j3sa0043swogoo84sks0okwkcgc8gws’,
‘clientSecret’ => ‘1njtf1fdorao3939100falalfakcc0ko040k8wwgk’,
‘callback’ => ‘http://www.myjoomla.com/’,
)

It goes to this Mautic page :
http://www.myjoomla.com/mautic/oauth/v1/authorize?oauth_token=945q5qrqr9qalda0a9afdhjaf09a4qahaweswra4526gbsa

After login in to that page, it delivers a mostly blank page with the following text at the top left corner:
Callback is not valid.

from the log:
2015-09-16T16:16:50+00:00 ERROR #.#.#.# plg_mautic Incorrect access token parameters returned: Array
2015-09-16T16:16:38+00:00 INFO #.#.#.# plg_mautic Authorize method called.
2015-09-16T16:03:39+00:00 INFO #.#.#.# plg_mautic Authorize method called.

That’s great. We are moving forward :slight_smile:

That message means that the callback URL from the oAuth credentials stored in Mautic is different than the one Plugin provides during the request. It should be base URL of your Joomla. Here is more about it https://github.com/escopecz/mautic-joomla#plugin-authorization

Should it be http://myjoomla.com can it also be http://www.myjoomla.com?

I have recreated the Mautic API Credentials based on the http://www.myjoomla.com. Reset the Keys in the plugin with the newly created keys.

Results:
2015-09-16T18:02:37+00:00 ERROR #.#.#.# plg_mautic Incorrect access token parameters returned: Array
2015-09-16T18:02:36+00:00 INFO #.#.#.# plg_mautic Authorize method called.

it should be what you have as a default URL address. The redirect could be problem I think. You didn’t have to create the new credentials. Callback can be updated.

Now the error says that the access token is incorrect (obviously).

Still experiencing the same issue with the Mautic-Joomla Plugin. I made sure that all information is provided correctly, e.g. callback, keys, etc. Any suggestions?

Clinking Authorise, I am send to the Mautic login page.
I get the following after loggin in:
Link in the browser address: http://www.myjoomla.com/mautic/oauth/v1/authorize?oauth_token=3lf7g3d307ggog84w8o8c8go08sg8kgw4gwkocg84s04888s80
Displayed on the page: Callback is not valid.
In the Log: 2015-09-19T02:37:28+00:00 ERROR #.#.#.# plg_mautic PLG_MAUTIC_ACCESS_TOKEN_NOT_VALID
2015-09-19T02:37:28+00:00 INFO #.#.#.# plg_mautic Authorize method called.

I have same problem at the last version Joomla 3 throu OAuth1.
«Callback is not valid.»

If I use OAuth2 - all OK.