# Parameter Absent

**URL:** https://forum.mautic.org/t/parameter-absent/5446
**Category:** Product Support
**Created:** [September 23, 2016, 3:21pm UTC](https://forum.mautic.org/t/parameter-absent/5446 "2016-09-23T15:21:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![wifiexpress](https://avatars.discourse-cdn.com/v4/letter/w/5fc32e/32.png) [@wifiexpress](https://forum.mautic.org/u/wifiexpress)
#### Post date: [September 23, 2016, 3:21pm UTC](https://forum.mautic.org/t/parameter-absent/5446/1 "2016-09-23T15:21:30Z")

</div>

Hi my name is Alessio and I have a issue using the Mautic Api.  
  
here is my code

Code:

$baseUrl='https://myurl.mautic.net'; $contactApi = MauticApi::newApi("contacts", $auth, $baseUrl); $createIfNotFound = true;

```
$data = array(
    'firstname' => $emailContact,
    'email' => $emailContact,
    'tags' => $campaign
);

$contact = $contactApi->edit($idContact, $data, $createIfNotFound);
echo serialize($contact);</div>

```

  
the echo retrive this:  

Code:

a:1:{s:5:"error";a:2:{s:7:"message";s:16:"parameter\_absent";s:4:"code";i:400;}}

  
I have copy the Authentication procedure from the wiki.  

Code:

$settings = array( 'baseUrl' =\> 'https://myurl.mautic.net', 'version' =\> 'OAuth1a', 'clientKey' =\> 'myKey', 'clientSecret' =\> 'MyKey', 'callback' =\> '' ); $auth = OAuth::newAuth($settings); if ($auth-\>validateAccessToken()) { if ($auth-\>accessTokenUpdated()) { $accessTokenData = $auth-\>getAccessTokenData(); } }

  
I don't understand what's wrong with my code. What is the parameter who is absent? Could you help me?

---

<div class="post-metadata">

### Author: ![wifiexpress](https://avatars.discourse-cdn.com/v4/letter/w/5fc32e/32.png) [@wifiexpress](https://forum.mautic.org/u/wifiexpress)
#### Post date: [September 23, 2016, 3:21pm UTC](https://forum.mautic.org/t/parameter-absent/5446/2 "2016-09-23T15:21:30Z")

</div>

Hi my name is Alessio and I have a issue using the Mautic Api.  
here is my code

```auto
$baseUrl='https://myurl.mautic.net';
    $contactApi = MauticApi::newApi("contacts", $auth, $baseUrl);
    $createIfNotFound = true;

    $data = array(
        'firstname' => $emailContact,
        'email' => $emailContact,
        'tags' => $campaign
    );

    $contact = $contactApi->edit($idContact, $data, $createIfNotFound);
    echo serialize($contact);
```

the echo retrive this:

```auto
a:1:{s:5:"error";a:2:{s:7:"message";s:16:"parameter_absent";s:4:"code";i:400;}}
```

I have copy the Authentication procedure from the wiki.

```auto
$settings = array(
        'baseUrl' => 'https://myurl.mautic.net',
        'version' => 'OAuth1a',
        'clientKey' => 'myKey',
        'clientSecret' => 'MyKey',
        'callback' => ''
    );
    $auth = OAuth::newAuth($settings);
    if ($auth->validateAccessToken()) {
        if ($auth->accessTokenUpdated()) {
            $accessTokenData = $auth->getAccessTokenData();
        }
    }
```

I don’t understand what’s wrong with my code. What is the parameter who is absent? Could you help me?

---

<div class="post-metadata">

### Author: ![sandeeptxlit](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sandeeptxlit](https://forum.mautic.org/u/sandeeptxlit)
#### Post date: [October 18, 2016, 8:54am UTC](https://forum.mautic.org/t/parameter-absent/5446/3 "2016-10-18T08:54:27Z")

</div>

Getting same error.

Stops working without touching the code base.

API not working properly.

---

<div class="post-metadata">

### Author: ![Elenchus](https://avatars.discourse-cdn.com/v4/letter/e/ccd318/32.png) [@Elenchus](https://forum.mautic.org/u/Elenchus)
#### Post date: [October 18, 2016, 12:00pm UTC](https://forum.mautic.org/t/parameter-absent/5446/4 "2016-10-18T12:00:07Z")

</div>

If you’re sure your code is right you can put in a bug report here: [https://github.com/mautic/mautic](https://github.com/mautic/mautic)
