Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code400 #207

Open
ZTzha opened this issue Feb 7, 2020 · 0 comments
Open

code400 #207

ZTzha opened this issue Feb 7, 2020 · 0 comments

Comments

@ZTzha
Copy link

ZTzha commented Feb 7, 2020

`<?php
include('api-library/vendor/autoload.php');
include('config.php');

use Mautic\MauticApi;
use Mautic\Auth\ApiAuth;
session_start();

$settings = array(
'baseUrl' => $config['apiURL'],
'version' => 'OAuth1a',
'clientKey' => $config['ConsumerKey1'],
'clientSecret' => $config['ConsumerSecret1'],
'callback' => 'http://192.168.1.159/mautic_api/test.php'
);

$id = 1;
$initAuth = new ApiAuth();
$auth = $initAuth->newAuth($settings);
$apiUrl = $config['apiURL'];
$api = new MauticApi();
$contactApi = $api->newApi("contacts", $auth, $apiUrl);
$response = $contactApi->get($id);
print_r($response);

?>`

it is wrong?


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant