# Joomla PLG\_MAUTIC\_ACCESS\_TOKEN\_NOT\_VALID

**URL:** <https://forum.mautic.org/t/joomla-plg-mautic-access-token-not-valid/6544>\
**Category:** Product Support\
**Created:** [November 15, 2016, 8:59am UTC](https://forum.mautic.org/t/joomla-plg-mautic-access-token-not-valid/6544 "2016-11-15T08:59:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mymario](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@mymario](https://forum.mautic.org/u/mymario)\
**Post date:** [November 15, 2016, 8:59am UTC](https://forum.mautic.org/t/joomla-plg-mautic-access-token-not-valid/6544/1 "2016-11-15T08:59:28Z")

</div>

I am not able to authorise the Joomla plugin to use Mautic API over OAuth2.

Code:

ERROR plg\_mautic PLG\_MAUTIC\_ACCESS\_TOKEN\_NOT\_VALID

INFO plg\_mautic Authorize method called.  
When doing so I need to login to Mautic and then get redirected back to Joomla with a state and code in the URL ending up in a 500 Error:

Code:

302 https://web01.mydomain.net/?plugin=mautic&authorize=true 302 https://web01.mydomain.net/en/?plugin=mautic&authorize=true 302 https://www.mydomain.ch/ma/index.php/oauth/v2/authorize?client\_id=6\_64\*\*\*&redirect\_uri=https://web01.mydomain.net/&state=f8a\*\*\*&scope=&response\_type=code 302 https://web01.mydomain.net/?state=f8a\*\*\*5&code=YjR\*\*\* 500 https://web01.mydomain.net/en/?state=f8a\*\*\*&code=YjR\*

  
What could cause that error?  
  
Settings used for OAuth

Code:

array ( 'baseUrl' =\> 'https://www.mydomain.ch/ma/index.php', 'version' =\> 'OAuth2', 'clientKey' =\> '6\_64\*\*\*', 'clientSecret' =\> 'xf3\*\*\*', 'callback' =\> 'https://web01.mydomain.net/', )

---

<div class="post-metadata">

**Author:** ![mymario](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@mymario](https://forum.mautic.org/u/mymario)\
**Post date:** [November 15, 2016, 8:59am UTC](https://forum.mautic.org/t/joomla-plg-mautic-access-token-not-valid/6544/2 "2016-11-15T08:59:28Z")

</div>

I am not able to authorise the Joomla plugin to use Mautic API over OAuth2.

```auto
ERROR plg_mautic	PLG_MAUTIC_ACCESS_TOKEN_NOT_VALID
```

INFO plg\_mautic Authorize method called.  
When doing so I need to login to Mautic and then get redirected back to Joomla with a state and code in the URL ending up in a 500 Error:

`302 https://web01.mydomain.net/?plugin=mautic&authorize=true
302 https://web01.mydomain.net/en/?plugin=mautic&authorize=true
302 https://www.mydomain.ch/ma/index.php/oauth/v2/authorize?client_id=6_64 ***&redirect_uri=https://web01.mydomain.net/&state=f8a*** &scope=&response_type=code
302 https://web01.mydomain.net/?state=f8a ***5&code=YjR***
500 https://web01.mydomain.net/en/?state=f8a***&code=YjR*`

What could cause that error?

Settings used for OAuth

`array (
  'baseUrl' => 'https://www.mydomain.ch/ma/index.php',
  'version' => 'OAuth2',
  'clientKey' => '6_64***',
  'clientSecret' => 'xf3***',
  'callback' => 'https://web01.mydomain.net/',
)`
