## CreateAgentExecutionConversationToken `client.Agents.NewExecutionConversationToken(ctx, body) (*AgentNewExecutionConversationTokenResponse, error)` **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: ```yaml agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35" ``` ### Parameters - `body AgentNewExecutionConversationTokenParams` - `AgentExecutionID param.Field[string]` ### Returns - `type AgentNewExecutionConversationTokenResponse struct{…}` - `Token string` ### Example ```go package main import ( "context" "fmt" "github.com/gitpod-io/gitpod-sdk-go" "github.com/gitpod-io/gitpod-sdk-go/option" ) func main() { client := gitpod.NewClient( option.WithBearerToken("My Bearer Token"), ) response, err := client.Agents.NewExecutionConversationToken(context.TODO(), gitpod.AgentNewExecutionConversationTokenParams{ AgentExecutionID: gitpod.F("6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Token) } ``` #### Response ```json { "token": "token" } ```