Okay, I need some hand holding since I don’t usually work with APIs in my programming (trying to immerse myself in the Mautic API though).
I started by downloading the API from https://github.com/mautic/api-library and uploaded it to a folder where I want to start testing it out. I followed instructions I found on this blog. However, when I try to load the PHP page I created with the updated code from step 3.3, I get this error:
Quote:
Fatal error: Class 'ApiAuth' not found in /htdocs/path/to/file/mautic_test.php on line 28
Line 28 contains:
Code:
$auth = ApiAuth::initiate($settings);
So, it's clear I didn't include a file, but I'm really unsure which file I need to include. Any direction will help.
Okay, I need some hand holding since I don’t usually work with APIs in my programming (trying to immerse myself in the Mautic API though).
I started by downloading the API from https://github.com/mautic/api-library and uploaded it to a folder where I want to start testing it out. I followed instructions I found on this blog. However, when I try to load the PHP page I created with the updated code from step 3.3, I get this error:
Line 28 contains: $auth = ApiAuth::initiate($settings);
So, it’s clear I didn’t include a file, but I’m really unsure which file I need to include. Any direction will help.
The API tester is very much a developer oriented tool, I would consider composer a requirement, or at least the easiest way of getting it running. @escopecz might be able to offer some additional notes on trying to do it without though.
If you don’t have Composer installed, the library also has an autoloader which can make sure classes get loaded in. You’ll need to call include_once '/path/to/lib/Mautic/AutoLoader.php'; in your code before trying to call the Mautic API classes.
Gotta use MauticAuthApiAuth and it works. Might want to update the Readme in the api-library.
Im using OAuth1a with no callback, and it says “Callback not valid”. I need to have NO Callback when using the API. I know this is possible, just don’t know how to do it with Mautic Auth…