https://prefect.io logo
Title
s

Shivan Trivedi

02/13/2023, 10:36 AM
Hi Community, I am trying to use Prefect REST API to create flow run for a deployment but it's giving 403 and an error message saying that "Not authenticated" in response. What should I add for authentication ? Could any one help me on this? Thanks in Advance.
j

Joan Gil

02/13/2023, 2:00 PM
@Shivan Trivedi I think you need to run
prefect cloud login -k {api_key}
This would leave you logged in to prefect cloud in the machine
s

Shivan Trivedi

02/14/2023, 6:03 AM
Hey @Joan Gil is there any other way to do this for example a token to pass in request such that we do not have to login again and again while automating the rest api flow
j

Joan Gil

02/14/2023, 2:26 PM
Hey @Shivan Trivedi - once you log in, the machine stays logged in indefinitely. Here is the link to the docs where you can find other options
hope it helps!
🙌 1