Skip to content

docs: add guidance for creating user matching OpenClaw agentId#1056

Closed
leckylao wants to merge 2 commits intovolcengine:mainfrom
leckylao:docs/add-main-user-requirement
Closed

docs: add guidance for creating user matching OpenClaw agentId#1056
leckylao wants to merge 2 commits intovolcengine:mainfrom
leckylao:docs/add-main-user-requirement

Conversation

@leckylao
Copy link
Copy Markdown

Problem

When using the OpenClaw plugin with OpenViking, users may encounter these errors:

  1. Access denied for viking://agent/xxx/memories
  2. INVALID_ARGUMENT: ROOT requests to tenant-scoped APIs must include X-OpenViking-Account and X-OpenViking-User headers

These occur because:

  • OpenClaw defaults to using main as the agentId
  • The plugin creates a user-specific memory space based on userId:agentId hash
  • If the user does not exist in OpenViking, access is denied
  • Using the root API key without proper headers causes authentication failures

Solution

This PR adds documentation to help users:

  1. Added warning box in Step 2: Create Team & Users — Explains the agentId requirement with commands to:

    • Check current agentId
    • Create the user in OpenViking
    • Generate a user API key
  2. Added troubleshooting entries — Two new rows in the troubleshooting table:

    • Access denied for viking://agent/xxx/memories → Create user matching agentId
    • INVALID_ARGUMENT: ROOT requests... → Use user API key instead of root key

Testing

These steps were verified on a production OpenClaw + OpenViking setup. Creating the main user and using its API key resolved both error types.

OpenClaw defaults to using 'main' as the agentId, which creates a
user-specific memory space. Users need to create this user in
OpenViking and generate a user API key to avoid Access denied errors.

This adds:
- Warning box in Step 2: Create Team & Users
- Commands to create user and generate API key
- Troubleshooting entries for Access denied and INVALID_ARGUMENT errors
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

@leckylao
Copy link
Copy Markdown
Author

This PR was heading in the wrong direction. The issue is not documentation but a code bug: the plugin doesn't send X-OpenViking-Account and X-OpenViking-User headers when using root API key, which prevents access to agent scope.

I will create a new PR with the correct code fix.

@leckylao leckylao closed this Mar 28, 2026
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant