Hi Community, I am trying to use Prefect REST API ...
# ask-community
s
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
@Shivan Trivedi I think you need to run
Copy code
prefect cloud login -k {api_key}
This would leave you logged in to prefect cloud in the machine
s
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
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