<@U04UQ68083H> ory tunnel Access credentials are i...
# ory-copilot
h
@chilly-king-10285 ory tunnel Access credentials are invalid -> wtf?
b
A message from kapa.ai
If you are seeing an "Access credentials are invalid" error when using ory tunnel, this typically means that the credentials (such as username and password, or API keys) you are providing are not correct or are not being accepted by the Ory service. Based on the knowledge sources, there is no explicit documentation of this exact error message for ory tunnel. However, similar error messages in Ory products (such as "The provided credentials are invalid, check for spelling mistakes in your password or username, email address, or phone number.") indicate that you should double-check your credentials for typos or incorrect values. This is a common error when authentication fails due to invalid input, and the solution is usually to verify and re-enter your credentials carefully [UI message codes](https://www.ory.sh/docs/kratos/concepts/ui-user-interface#the-provided-credentials-are-invalid-check-for-spelling-mistakes-in-your-password-or-username-email-address-or-phone-number-4000006). If you are using HTTP Basic Auth or OAuth2 client credentials, ensure that the username and password (or client ID and secret) are correct and match what is registered in your Ory project or OAuth2 provider. If you continue to have issues, it may be helpful to check your Ory Console for the correct credentials or reset them if needed. If this error occurs during local development with ory tunnel, make sure you are logged into your Ory account and that your project slug is correct. If you recently changed your credentials, try logging out and back in, or restarting the tunnel process [Local development](https://www.ory.sh/docs/getting-started/local-development#local-development). If the problem persists and you are certain your credentials are correct, there may be a deeper configuration or network issue. In that case, consider reaching out to Ory support or checking for any ongoing incidents. I'm sorry, but the knowledge sources do not contain more specific troubleshooting steps for this exact error with ory tunnel.
h
@chilly-king-10285 but im just calling ory tunnel --project <PROJECT_ID> as always and it always worked before
b
A message from kapa.ai
New message text here
h
@chilly-king-10285 how do I even provide credentials with ory tunnel
b
A message from kapa.ai
To provide credentials with
ory tunnel
, you have two main options according to the knowledge sources: 1. Browser-based Sign-in (Interactive) - When you run
ory tunnel
without API keys, the CLI will prompt you to log in via your browser. This is the default behavior for most local development scenarios. You simply follow the prompt and authenticate in your browser window. 2. API Key (Automated/CI Environments) - For automated environments or if you want to avoid browser prompts, you can use a Project API Key. Set the
ORY_PROJECT_API_KEY
environment variable before running the tunnel command. For example:
Copy code
export ORY_PROJECT_API_KEY=<your-project-api-key>      ory tunnel --project <project-id> <http://localhost:3000>
- This will authenticate the CLI using the API key and will not prompt for browser login. This method is especially useful for CI/CD pipelines or headless environments. You can generate a Project API Key in the Ory Console and use it as shown above. If you use the
--quiet
flag, it will also suppress browser prompts and output:
Copy code
ORY_PROJECT_API_KEY=<project-api-key> ory tunnel -q ...
[Ory Tunnel CLI docs](https://www.ory.sh/docs/cli/ory-tunnel#ory-tunnel), [CLI Basics](https://www.ory.sh/docs/guides/cli/cli-basics) If you are still being prompted for credentials or see errors, make sure your API key is valid and has not expired. If you are using browser-based login, ensure you complete the authentication in the browser window that opens.
h
The dialog doesnt show anymore
@chilly-king-10285 the dialog does not show anymore
b
A message from kapa.ai
If the browser login dialog does not show anymore when running
ory tunnel
, the knowledge sources do not provide a direct solution or troubleshooting steps for this specific issue. However, here are the relevant points based on the available documentation: - Normally, when you run
ory tunnel
without an API key, the CLI should prompt you to log in via your browser. This is described as the default behavior for local development [Ory Tunnel CLI docs](https://www.ory.sh/docs/cli/ory-tunnel#ory-tunnel). - If the dialog does not appear, it could be due to a change in CLI behavior, a cached/expired session, or a temporary issue with the Ory service. Previous issues with
ory tunnel
have sometimes resolved themselves after retrying or after Ory fixed a backend problem [Github Issue: opening a ory tunnel for local dev doesn't work anymore](https://github.com/ory/network/issues/407). - As an alternative, you can authenticate using a Project API Key by setting the
ORY_PROJECT_API_KEY
environment variable before running the command. This bypasses the browser dialog entirely and is the recommended approach for automated or headless environments [Ory Tunnel CLI docs](https://www.ory.sh/docs/cli/ory-tunnel#ory-tunnel). Summary: The knowledge sources do not explicitly explain why the browser dialog might stop appearing. If retrying does not help, try authenticating with a Project API Key as a workaround. If the issue persists, it may be necessary to contact Ory support or check for updates regarding the CLI or service status.