From 23cf0207abfc9a3f2a01243dfbcca5dcd3b337e5 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 6 Dec 2022 15:25:17 +0300 Subject: [PATCH] Cms Domains (Codegen only) --- codegen/Cms/Domains/Api/DomainsApi.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/codegen/Cms/Domains/Api/DomainsApi.php b/codegen/Cms/Domains/Api/DomainsApi.php index 049d5ce9..73ce5888 100644 --- a/codegen/Cms/Domains/Api/DomainsApi.php +++ b/codegen/Cms/Domains/Api/DomainsApi.php @@ -402,6 +402,10 @@ public function getByIdRequest($domain_id) if ($apiKey !== null) { $queryParams['hapikey'] = $apiKey; } + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -831,6 +835,10 @@ public function getPageRequest($created_at = null, $created_after = null, $creat if ($apiKey !== null) { $queryParams['hapikey'] = $apiKey; } + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } $defaultHeaders = []; if ($this->config->getUserAgent()) {