For more authentication options, see: https://doc.rapida.ai/api-reference/authentication
Parameters
ConnectionConfig
required
Configuration for the client connection.
GetAssistantWebhookRequest
required
Usage
from rapida import (
ConnectionConfig,
GetAssistantWebhookRequest,
get_assistant_webhook,
)
from pprint import pprint
connection_config = ConnectionConfig.default_connection_config(
ConnectionConfig.with_sdk(
"{rapida-api-key}"
)
)
response = get_assistant_webhook(
client_cfg=connection_config,
request=GetAssistantWebhookRequest(
id="{assistant_webhook_id}", assistantId="{assistant_id}"
),
)
pprint(response)
package main
import (
"context"
"fmt"
"os"
clients "github.com/rapidaai/rapida-go/rapida/clients"
rapida_proto "github.com/rapidaai/rapida-go/rapida/clients/protos"
connections "github.com/rapidaai/rapida-go/rapida/connections"
)
func main() {
// Configure client connection using RAPIDA_PROJECT_CREDENTIAL environment variable
connectionConfig := connections.
DefaultconnectionConfig(connections.WithSDK(os.Getenv("RAPIDA_PROJECT_CREDENTIAL")))
// Retrieve webhook information
response, err := clients.GetAssistantWebhook(context.Background(), connectionConfig, &rapida_proto.GetAssistantWebhookRequest{
AssistantId: 3456789876541212,
Id: 567898765456788765,
})
if err != nil {
fmt.Printf("Error while making call using rapida: %+v\n", err)
return
}
// Print the response
fmt.Printf("Rapida calling response: %+v\n", response)
}
import {
ConnectionConfig,
GetAssistantWebhook,
GetAssistantWebhookRequest,
} from "@rapidaai/nodejs";
(async () => {
const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
ConnectionConfig.WithSDK({
ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
})
);
getAssistantWebhook(45678903456789, 12345676543211);
})();
async function getAssistantWebhook(connectionCfg, assistantId, webhookId) {
const request = new GetAssistantWebhookRequest();
request.setAssistantId(assistantId);
request.setId(webhookId);
try {
const response = await GetAssistantWebhook(connectionCfg, request);
console.log("Assistant Webhook Response:", response.toObject());
} catch (error) {
console.error("Error with GetAssistantWebhook call:", error);
}
}
Response
int32
Numeric status code for the operation.
boolean
Indicates whether the operation was successful.
AssistantWebhook
Detailed information about the assistant webhook.
Show child attributes
Show child attributes
uint64
Unique identifier for the webhook.
string[]
Array of call, WebRTC, or conversation event names that trigger this webhook.
string
Description of the webhook’s purpose and functionality.
string
Webhook provider. HTTP webhooks use
http.Metadata[]
Delivery options for the webhook.
Show child attributes
Show child attributes
string
HTTP method used for delivery. Supported values are
POST, PUT, and PATCH.string
Target URL where webhook requests are sent.
string
JSON object containing HTTP headers included with each request.
string
JSON array of response status entries used by the delivery retry policy.
string
Maximum number of retry attempts after a retryable failure.
string
Maximum time in seconds to wait for the webhook endpoint to respond.
uint32
Priority level for webhook execution when multiple webhooks are triggered.
uint64
Identifier of the assistant that owns this webhook.
string
Current status of the webhook (e.g., “active”, “inactive”).
uint64
Identifier of the user who created the webhook.
User
User object representing the creator of the webhook.
uint64
Identifier of the user who last updated the webhook.
User
User object representing the last updater of the webhook.
timestamp
Timestamp when the webhook was created.
timestamp
Timestamp when the webhook was last updated.