Lawrence Finn
08/20/2021, 3:12 PMZanie
08/20/2021, 3:19 PMLawrence Finn
08/20/2021, 5:50 PMZanie
08/20/2021, 5:52 PMclient
code
if token:
headers["Authorization"] = "Bearer {}".format(token)
if self.api_key and self._tenant_id:
# Attach a tenant id to the headers if using an API key since it can be
# used accross tenants. API tokens cannot and do not need this header.
headers["X-PREFECT-TENANT-ID"] = self._tenant_id
Lawrence Finn
08/20/2021, 5:54 PMip-192-168-1-152:aiq lawrencefinn$ curl -H"Authorization: Bearer ...." <https://cloud.prefect.io/aiq/api>
<?xml version='1.0' encoding='UTF-8'?><Error><Code>AuthenticationRequired</Code><Message>Authentication required.</Message></Error>
<https://api.prefect.io/graphql>