How to authenticate HTTP requests to Orion Cloud 2.0 (using POSTman)

I’m trying to send GET and PATCH requests to the orion cloud server with POSTMan. When I try to do a simple GET request to https://api.prefect.cloud/auth/login, I get a 401 Unauthorised or 403 Not Authenticated. I’ve tried adding my API Key to the header like so too.

The docs here Prefect Cloud say that

Get credentials to access Prefect Cloud. Expects an identifying token as the bearer token.
Returns access and refresh tokens.`

Except I have no idea what the identifying token is or where to find it.

Basically my question is how do I sent HTTP requests?

1 Like

this might help:

https://discourse.prefect.io/t/how-to-trigger-a-flow-run-from-a-deployment-via-api-call-using-python-requests-library-or-from-a-terminal-using-curl/1396

Thanks, that was indeed helpful,

Turns out the "Authorization": f"Bearer {API_KEY}", in the header was the missing key for me.

1 Like