# Error while creating api credentials in mautic

**URL:** <https://forum.mautic.org/t/error-while-creating-api-credentials-in-mautic/31518>\
**Category:** Product Support\
**Created:** [April 2, 2024, 8:47am UTC](https://forum.mautic.org/t/error-while-creating-api-credentials-in-mautic/31518 "2024-04-02T08:47:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shishir](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@shishir](https://forum.mautic.org/u/shishir)\
**Post date:** [April 2, 2024, 8:47am UTC](https://forum.mautic.org/t/error-while-creating-api-credentials-in-mautic/31518/1 "2024-04-02T08:47:40Z")

</div>

**Your software**  
My Mautic version is:4.4.5  
My PHP version is:7.4

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/ab5cb1ee30081affec0888aeb1b45b6ebfedb49f.png)

while creating a API credential this issue is coming and after creation it is showing 500 error

[2024-04-02 03:39:10] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\InvalidFieldNameException: “An exception occurred while executing ‘INSERT INTO oauth2\_clients (name, random\_id, secret, redirect\_uris, allowed\_grant\_types, role\_id) VALUES (?, ?, ?, ?, ?, ?)’ with params [“pabbly”, “1jqma97im1q8wggcwkw0000ocs0gwg0wok4gc4s8kwggc444kg”, “4dhu0va61neoo0oscswwckggsw8g0ko84880k00k4w8kw04kg8”, “a:1:{i:0;s:29:"https://domain";}”, “a:3:{i:0;s:18:"authorization\_code";i:1;s:13:"refresh\_token";i:2;s:18:"client\_credentials";}”, 1]: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘role\_id’ in ‘field list’” at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 {“exception”:“[object] (Doctrine\DBAL\Exception\InvalidFieldNameException(code: 0): An exception occurred while executing ‘INSERT INTO oauth2\_clients (name, random\_id, secret, redirect\_uris, allowed\_grant\_types, role\_id) VALUES (?, ?, ?, ?, ?, ?)’ with params ["pabbly", "1jqma97im1q8wggcwkw0000ocs0gwg0wok4gc4s8kwggc444kg", "4dhu0va61neoo0oscswwckggsw8g0ko84880k00k4w8kw04kg8", "a:1:{i:0;s:29:\"https:\/\/domain\";}", "a:3:{i:0;s:18:\"authorization\_code\";i:1;s:13:\"refresh\_token\";i:2;s:18:\"client\_credentials\";}", 1]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘role\_id’ in ‘field list’ at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:79, Doctrine\DBAL\Driver\PDO\Exception(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘role\_id’ in ‘field list’ at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘role\_id’ in ‘field list’ at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)”} {“hostname”:“”,“pid”:10088}
