import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const agents = await client.messaging.rcs.agents.list();
console.log(agents.data);{
"data": [
{
"agent_id": "TestAgent",
"user_id": "2ecf295b-36c6-4d43-ad05-71eb1e560518",
"profile_id": "4001932a-b8a3-42fc-9389-021be6388909",
"webhook_url": "http://example.com",
"webhook_failover_url": "http://example.com",
"agent_name": "Test Agent",
"enabled": true,
"created_at": "2024-01-01T12:00:00.000Z",
"updated_at": "2024-01-01T12:00:00.000Z"
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const agents = await client.messaging.rcs.agents.list();
console.log(agents.data);{
"data": [
{
"agent_id": "TestAgent",
"user_id": "2ecf295b-36c6-4d43-ad05-71eb1e560518",
"profile_id": "4001932a-b8a3-42fc-9389-021be6388909",
"webhook_url": "http://example.com",
"webhook_failover_url": "http://example.com",
"agent_name": "Test Agent",
"enabled": true,
"created_at": "2024-01-01T12:00:00.000Z",
"updated_at": "2024-01-01T12:00:00.000Z"
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful reponse with the list of RCS agents
Show child attributes
RCS Agent ID
"TestAgent"
User ID associated with the RCS Agent
"2ecf295b-36c6-4d43-ad05-71eb1e560518"
Messaging profile ID associated with the RCS Agent
"4001932a-b8a3-42fc-9389-021be6388909"
URL to receive RCS events
"http://example.com"
Failover URL to receive RCS events
"http://example.com"
Human readable agent name
"Test Agent"
Specifies whether the agent is enabled
true
Date and time when the resource was created
"2024-01-01T12:00:00.000Z"
Date and time when the resource was updated
"2024-01-01T12:00:00.000Z"
Was this page helpful?