Issue while retrieving access token using client id and client secret

Hi SuiteCRM Team, @pgr , @BastianHammer

I m receiving below error while trying to retrieve access_token based on client_id and client_secret

Uncaught TypeError: Argument 1 passed to Api\Core\Resolver\ConfigResolver::{closure}() must be an instance of Interop\Container\ContainerInterface, instance of Slim\Container given, called in /vendor/pimple/pimple/src/Pimple/Container.php on line 118 and defined in /Api/V8/Config/services/middlewares.php:20\n
Stack trace:\n
#0 /vendor/pimple/pimple/src/Pimple/Container.php(118): Api\Core\Resolver\ConfigResolver::{closure}()\n
#1 /vendor/slim/slim/Slim/Container.php(109): Pimple\Container->offsetGet()\n
#2 /Api/V8/Config/routes.php(17): Slim\Container->get()\n
#3 /vendor/slim/slim/Slim/RouteGroup.php(25): Api\Core\Loader\RouteLoader->{closure}()\n
#4 /vendor/slim/slim/Slim/App.php(272): Slim\RouteGroup->__invoke()\n
#5 /Api/V8/Config/routes.php(127): Slim\App->group()\n
#6 /var/www/ in /Api/V8/Config/services/middlewares.php on line 20
\n

Our CRM is behind VPN , would this be cause for the issue?

since this is a core file i was stuck checkign this issue . Please help out.

Do let me know if you need any further information on this.

Regards,
Sravani

Hello Sravani,

I have not seen this error before, but a quick search on the forums seems to be pointing to issues with the environment:

You’re on an up to date version of everything?
Fitting the compatibility matrix?
What happens, if you make the request from the same server, so that you can eliminate the VPN question?

Hi @BastianHammer

Thank you for responding , the CRM is within compatibility matrix and we are on 7.11.10 version of SuiteCRM.
I tried within the same server and getting same error i.e as below

Fatal error: Uncaught TypeError: Argument 1 passed to Api\Core\Resolver\ConfigResolver::{closure}() must be an instance of Interop\Container\ContainerInterface, instance of Slim\Container given, called in /var/www/crm.dev.redpiranha.net/vendor/pimple/pimple/src/Pimple/Container.php on line 118 and defined in /var/www/crm.dev.redpiranha.net/Api/V8/Config/services/middlewares.php:20 Stack trace: #0 /var/www/crm.dev.redpiranha.net/vendor/pimple/pimple/src/Pimple/Container.php(118): Api\Core\Resolver\ConfigResolver::{closure}() #1 /var/www/crm.dev.redpiranha.net/vendor/slim/slim/Slim/Container.php(109): Pimple\Container->offsetGet() #2 /var/www/crm.dev.redpiranha.net/Api/V8/Config/routes.php(17): Slim\Container->get() #3 /var/www/crm.dev.redpiranha.net/vendor/slim/slim/Slim/RouteGroup.php(25): Api\Core\Loader\RouteLoader->{closure}() #4 /var/www/crm.dev.redpiranha.net/vendor/slim/slim/Slim/App.php(272): Slim\RouteGroup->__invoke() #5 /var/www/crm.dev.redpiranha.net/Api/V8/Config/routes.php(127): Slim\App->group() #6 /var/www/ in /var/www/crm.dev.redpiranha.net/Api/V8/Config/services/middlewares.php on line 20

7.11.10 is quite an old version.

Maybe it’s a bug which has already been fixed?
Maybe something in the usage of the API?

Try to find some hints at github which seem to be related: