code400
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 205
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
`<?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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PHP example in the issue, including config.php and api-library/vendor/autoload.php, then trace ApiAuth::newAuth and the contacts API get call. Reproduce the code400 response and compare the configured API URL, OAuth1a settings, callback, and contact request with the library's documented expectations; done means the cause and a reproducible correction are identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100