# Documentation Disaster

**URL:** <https://forum.mautic.org/t/documentation-disaster/18201>\
**Category:** Product Support\
**Created:** [February 17, 2021, 8:40am UTC](https://forum.mautic.org/t/documentation-disaster/18201 "2021-02-17T08:40:40Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![adam.clark](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adam.clark/32/4501_2.png) [@adam.clark](https://forum.mautic.org/u/adam.clark)\
**Post date:** [February 17, 2021, 10:18am UTC](https://forum.mautic.org/t/documentation-disaster/18201/5 "2021-02-17T10:18:16Z")

</div>

OK… really interesting.

I was just about to message you about that!..

In the docs, it says to base64 encode the string and send it as an Auth header…

e.g.

```
$username = "myLoginUsernameToMyMauticInstance";
$password = "myPasswordToMyMauticInstance"; 
$str = $username . ":" . $password; echo "<p>str: " . $str . "</p>";
$apikey = base64_encode($str);

```

Then I did something like this:

```
$id=2;
$url = $endpoint . "contacts/" . $id; echo "<p>URL: " . $url . "</p>";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);

curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $apikey)); echo "<p>apikey: " . $apikey . "</p>";
curl_setopt($curl,CURLOPT_FOLLOWLOCATION,true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // Set the result output to be a string.
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
$data = curl_exec($curl);
if ($data === false) 
	{
	$info = curl_getinfo($curl);
	curl_close($curl);
	die('error occured during curl exec. Additional info: ' . var_export($info));
	}
	else
	{
	curl_close($curl);
	}

$decodedContact = json_decode($data);
echo "<h2>decodedContact</h2>";
echo "<pre>";
print_r($decodedContact);
echo "</pre>";

```

And it worked …

Is the whole UN & PW in the URL still working then???

---

_[View the full topic](https://forum.mautic.org/t/documentation-disaster/18201)._
