foundry_send_chat_as_user
Send a chat message in Foundry as a user, with author verification. Enforces that the API key is scoped to that user or has GM access to prevent impersonation.
Instructions
Create a chat message as a Foundry user and verify the returned ChatMessage.author.id. The relay permits this only for the API key's scoped user, or for a GM key; scoped keys cannot be overridden.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | ||
| userId | Yes | Foundry user ID for the message author. The relay must reject it unless it matches the scoped API-key user or the key has GM access. | |
| content | Yes | ||
| speaker | No | ||
| whisper | No | Recipient Foundry user IDs. For a private reply, pass only the originating player. | |
| chatType | No | Use 3 for a Whisper. | |
| clientId | No | Foundry client ID; omit when the API key is scoped to one world. |