<@U04UQ68083H> how can I use a workspace api key o...
# ory-copilot
f
@chilly-king-10285 how can I use a workspace api key or project api key with the ory cli?
c
A message from kapa.ai
You can use Workspace API keys and Project API keys with the Ory CLI by setting them as environment variables. Here's how you can do it:
Copy code
bash export ORY_WORKSPACE_API_KEY=ory_wak_8dwW9s....   export ORY_PROJECT_API_KEY=ory_pt_Wse93s....
Replace
ory_wak_8dwW9s....
and
ory_pt_Wse93s....
with your actual Workspace API key and Project API key respectively. After setting these environment variables, you can use the Ory CLI to manage workspaces, projects, and project data. For example, you can use the following commands:
Copy code
bash ory open ui --project <project>   ory open ui --workspace <workspace> --project <project>   ORY_WORKSPACE=<workpsace> ORY_PROJECT=<project> ory open ui
Remember to replace
<workspace>
and
<project>
with your actual workspace and project identifiers. For more details, you can refer to the [Ory CLI Basics](https://www.ory.sh/docs/guides/cli/cli-basics#authentication) and [Ory CLI Migration Guide](https://www.ory.sh/docs/guides/cli/cli-migration-v1#migrate-existing-scripts-and-automation).