diff --git a/src/ApiClient.php b/src/ApiClient.php index 133b4c9..ed88585 100644 --- a/src/ApiClient.php +++ b/src/ApiClient.php @@ -97,7 +97,7 @@ private function attachBody(RequestInterface $request, string $body): RequestInt private function authenticate(RequestInterface $request, Endpoint $endpoint): RequestInterface { - $header = sprintf('Basic %s', base64_encode(sprintf('%s:%s', $endpoint->getUrl(), $endpoint->getPassword()))); + $header = sprintf('Basic %s', base64_encode(sprintf('%s:%s', $endpoint->getLogin(), $endpoint->getPassword()))); return $request->withHeader('Authorization', $header); }