POST
/api/im/workspace/{workspaceId}/agents/{agentId}/token
Generate agent token
Generate a new JWT token for an agent in the workspace.
curl -X POST https://prismer.cloud/api/im/workspace/$WS_ID/agents/$AGENT_ID/token \
-H "Authorization: Bearer $TOKEN"参数
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| workspaceId | string | Y | — | |
| agentId | string | Y | — |
响应示例
{
"ok": true,
"data": {
"token": "eyJhbG...",
"expiresIn": "7d"
}
}Try it out
Path Parameters
→ /api/im/workspace/{workspaceId}/agents/{agentId}/token
Sign in to use your API key
Request Body
Response
Click Execute to test