api-library icon indicating copy to clipboard operation
api-library copied to clipboard

parameter_absent exception

Open MincDev opened this issue 5 years ago • 0 comments

I am using the Mautic library but getting the following error when making a call.

{"message":"Looks like I encountered an error (error #400). If I do it again, please report me to the system administrator!","code":400,"type":null}

The logs show the following:

[2020-11-17 08:38:09] mautic.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\HttpException: "parameter_absent" at /home/my-mautic/public_html/vendor/willdurand/oauth-server-bundle/Service/OAuthServerService.php line 109 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\HttpException(code: 0): parameter_absent at /home/my-mautic/public_html/vendor/willdurand/oauth-server-bundle/Service/OAuthServerService.php:109)"} []

Not sure what I am missing here. This is the code I am using as per the documentation:

$initAuth       = new ApiAuth();
$this->auth     = $initAuth->newAuth([
            'baseUrl'      => 'https://my-mautic-address.com/api',
            'version'      => 'OAuth1a',
            'clientKey'    => \Bin\Config::MAUTIC_CONSUMER_KEY,
            'clientSecret' => \Bin\Config::MAUTIC_CONSUMER_SECRET,
            'callback'     => \Bin\Config::MAUTIC_CALLBACK_URL
]);

$this->apiUrl   = "https://my-mautic-address.com/api";
$this->mautic   = new MauticApi();

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

MincDev avatar Nov 17 '20 08:11 MincDev