CreateAgentExecutionConversationToken
client.agents.createExecutionConversationToken(AgentCreateExecutionConversationTokenParams { agentExecutionId } body, RequestOptionsoptions?): AgentCreateExecutionConversationTokenResponse { token }
POST/gitpod.v1.AgentService/CreateAgentExecutionConversationToken
Creates a token for conversation access with a specific agent run.
This method generates a temporary token that can be used to securely connect to an ongoing agent conversation, for example in a web UI.
Examples
-
Create a token to join an agent run conversation in a front-end application:
agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"
CreateAgentExecutionConversationToken
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const response = await client.agents.createExecutionConversationToken({
agentExecutionId: '6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35',
});
console.log(response.token);{
"token": "token"
}Returns Examples
{
"token": "token"
}