Skip to content

Commit

Permalink
Fix authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Jan 11, 2023
1 parent c880164 commit 813f558
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Api/CpeApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 813f558

Please sign in to comment.