Troubleshooting
The embedded API error response, what common failures mean, and where to look when a connected user reports a problem.
Most embedded problems fall into three groups: the request did not authenticate, the connected user's credential is no longer valid, or the workflow ran and failed. Each group shows up in a different place, so start by telling them apart.
The error response
An embedded API error that reaches a controller returns a problem detail body (application/problem+json, RFC 9457):
{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Property values were not valid",
"instance": "/api/embedded/v1/user-42/integration-instances"
}| Field | Description |
|---|---|
status | The HTTP status code. |
detail | A human-readable description. Its wording can change, so do not branch on it. |
type, title | The problem type (about:blank, or a https://www.bytechef.io/problem/... URI for ByteChef domain errors) and a short title. |
instance | The request path. |
errorKey, entityClass, inputParameters | Present on ByteChef domain errors. |
errorCode | ACCESS_DENIED on a 403. |
Authentication failures are rejected before a controller runs. They return 401 with no problem detail body.
The Errors schema in the API reference
The API reference describes an errors array with id, code and the deprecated problem_type field. The current server does not return that shape.
What the status codes mean
| Status | In embedded, this usually means |
|---|---|
| 400 | The request was not valid: a required input is missing, a value is not accepted, or a ByteChef domain rule rejected it. |
| 401 | The credential was rejected: an unknown API Key, an API Key from another environment, a JWT that is expired, signed with the wrong key or carries an unknown kid, a JWT whose sub does not match the path, or a disabled connected user. |
| 403 | The credential authenticated but is not allowed to do this, for example an admin operation by a user who is not a tenant admin. |
| 404 | The integration, instance or workflow does not exist in the environment the request resolved to, or the connected user is not allowed to see the integration. A missing or wrong X-Environment header is the most common cause. |
| 409 | The request conflicts with a concurrent change. Reload and retry. |
| 500 | A ByteChef-side failure. Log the request and the response and send them to support. |
Authentication problems
API Keys and Signing Key JWTs both fail with 401, for different reasons:
- API Key - the key does not exist in the request's environment. Keys are scoped to an environment, so a Development key sent to Production fails like an invalid key. Without an
X-Environmentheader the request goes toPRODUCTION. - Signing Key JWT - the usual causes are an expired token (keep the TTL short and mint one per session), a
kidheader that does not match a Signing Key in the request's environment, or a token signed with the private key of a deleted Signing Key.
A disabled connected user is a separate case: the token is valid and the user exists, but requests are rejected with 401 until an admin enables the user again under Embedded → Connected Users. If one customer fails while everyone else works, check that user's enabled state first.
A JWT whose sub does not match the {externalUserId} segment of the request path (/api/embedded/v1/{externalUserId}/...) is also rejected with a 401, before the request reaches the endpoint. A token minted for one connected user cannot act on another user's path. Mint the token with the same id you put in the URL. The server URL-decodes the path segment before comparing.
Calling a frontend operation with an API Key is also rejected. Those paths carry no {externalUserId} segment, so there is no user for the key to act as. See the reference's authentication section.
Admin operations
Embedded admin operations require a tenant admin. This covers integrations, integration categories and tags, instance configurations, catalog projects, connected-user administration, App Events, workflow executions, external invocations, connections administration, MCP servers, and Signing Keys. For any other ByteChef user, access is denied. If a teammate cannot manage these under Embedded in the ByteChef UI, check that their account has the admin authority (ROLE_ADMIN).
Credential problems
A connection whose credential no longer works is marked INVALID. The two states are VALID and INVALID. A revoked OAuth grant, a rotated API key at the provider, or a password change all appear this way.
An invalid credential does not fail the API call that lists it. It fails the workflow that uses it, so the customer reports that an automation stopped working, not an error in your UI. Two places show it:
- The Connected Users table has a status column and a filter for invalid credentials. See Connected Users.
- Your own app can read it per connection from Connections.
To fix it, have the user reconnect through the Connect dialog, which replaces the credential in place.
Embedding problems
The workflow builder, Automation Hub and Integration Marketplace render in an iframe, so their failures show in the browser rather than in an API response:
- The iframe is blank and the console reports that a frame was refused because it violates
frame-ancestors- your app's origin is not inBYTECHEF_EMBEDDED_ALLOWED_PARENT_ORIGINSon the ByteChef server. Add the exact origin (scheme, host and port, no path) and restart the server. - The page stays on its loading state - it never received
EMBED_INITfrom an allowed origin. Check that the origin your app runs on matches an entry inBYTECHEF_EMBEDDED_ALLOWED_PARENT_ORIGINSexactly, includinghttpversushttpsand the port. If the list is empty, the page announces itself only to your app's origin as reported in the iframe's referrer, so an app served withReferrer-Policy: no-referrernever hears from it; set the allowed parent origins. - The console warns that no allowed parent origins are configured -
BYTECHEF_EMBEDDED_ALLOWED_PARENT_ORIGINSis empty, so any website can embed the pages. Set it before going to production.
Execution problems
If the request authenticated and the credential is valid, the failure is in the run itself. Workflow executions record every step with its inputs, outputs and error. See Workflow Executions for reading them, and Failures and Retries for what the engine does before it marks a run failed.
A checklist for a report you cannot reproduce
- Which environment? Development, Staging and Production hold separate connected users, connections and instances. Many "it does not exist" reports come from the wrong environment.
- Is the connected user enabled?
- Is their connection
VALID? - Did a run start? No execution record means the trigger never fired. Check that the workflow is enabled for that user's instance.
- What did the API return? Keep the request path, the time and the response body for support.
Related
How is this guide?
Last updated on