seeing this error on Prefect cloud when attempting to programatically start a flow run. Our authentication tokens have not changed so I'm wondering if something happend?
Copy code
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 978, in create_flow_run
res = self.graphql(create_mutation, variables=dict(input=inputs))
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 275, in graphql
result = <http://self.post|self.post>(
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 230, in post
response = self._request(
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 373, in _request
token = self.get_auth_token()
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 503, in get_auth_token
self._refresh_access_token()
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 618, in _refresh_access_token
payload = self.graphql(
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 294, in graphql
raise ClientError(result["errors"])
prefect.utilities.exceptions.ClientError: [{'path': ['refresh_token'], 'message': 'Unauthorized', 'extensions': {'code': 'FORBIDDEN'}}]
n
nicholas
04/22/2021, 7:40 PM
Hi @kevin - how are you authenticating?
k
kevin
04/22/2021, 7:43 PM
we're executing a login like this, passing some args to
login_to_tenant
Copy code
client = Client()
client.login_to_tenant()
n
nicholas
04/22/2021, 7:57 PM
Hm, you should be able to pass your service account API Key or user API key directly to
Client
and it should work
k
kevin
04/22/2021, 8:02 PM
if I don't pass any args to the
Client()
constructor it should pick up the creds from my
.env
file right?
n
nicholas
04/22/2021, 10:54 PM
It should but this will tell us if the token you have is good or not
k
kevin
04/22/2021, 10:55 PM
I think the issue is moot, I created a new token using the new web API UI rather than the Personal Access Tokens and the error seems to have stopped persisting
n
nicholas
04/22/2021, 10:55 PM
Interesting, thanks for reporting, I'll flag this for the team. Technically those tokens are being deprecated but I would expect them to still work
k
kevin
04/22/2021, 10:56 PM
yea, I'm not entirely sure what happened, I wished I had more insight to help you triage but it seems everything's okay for now
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.