diff --git a/src/Api/CpeApi.php b/src/Api/CpeApi.php index 9308b5d..a016fb4 100644 --- a/src/Api/CpeApi.php +++ b/src/Api/CpeApi.php @@ -396,6 +396,10 @@ public function consultarEnvioRequest($num_ticket, string $contentType = self::c } } + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } $defaultHeaders = []; if ($this->config->getUserAgent()) {