## TL;DR

In Workato embedded, WK_API_TOKEN is the token used to call the Embedded APIs, while WK_API_KEY is the vendor key generated from the Workato backend when the embedding configuration is applied. Keep the two distinct in your config and make sure the .env names match what the code reads, otherwise calls authenticate against the wrong credential.

## Fix

1. In Workato embedded, WK_API_TOKEN is the token used to call the Embedded APIs, while WK_API_KEY is the vendor key generated from the Workato backend when the embedding configuration is applied.
   Expected: You get the expected result; the problem is gone.
2. Keep the two distinct in your config and make sure the .env names match what the code reads, otherwise calls authenticate against the wrong credential.
   Expected: You get the expected result; the problem is gone.

## When to use

- You are setting up or using this Workato embedded feature.
- The symptom matches: WK_API_KEY vs WK_API_TOKEN and the .env parameter mismatch.

## When NOT to use

- Unrelated Workato embedded issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported against Workato embedded.

## Variant phrasings

### WK_API_KEY vs WK_API_TOKEN and the .env parameter mismatch

## Why it happens

GitHub issue on the Workato connection-embed sample: the sample referenced the vendor API token as WK_API_TOKEN in code but as WK_USER_TOKEN in .env, and the two credential names were being confused.

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.