Skip to main content
The RingCentralResourceClient allows you to connect to RingCentral and interact with communications data, including call logs, messages, SMS, and extension information.

Usage

import { myRingCentralClient } from "./clients";

const result = await myRingCentralClient.invoke(
  "GET",
  "/restapi/v1.0/account/~/call-log",
  "list-calls",
  {
    query: { limit: "100" },
  }
);

if (result.ok && result.result.body.kind === "json") {
  console.log("Call logs:", result.result.body.value);
}

Authentication

When creating a RingCentral connector, choose your OAuth scope:
  • Read-only — access call logs, messages, SMS, and extension data
  • Read-write — read-only access plus ability to send SMS and update data
  • Custom — configure specific permissions manually
The OAuth flow redirects to RingCentral to authenticate your account. Major securely stores the token and handles authentication for all API requests.

Common Operations

The RingCentral connector supports the following operations through the AI coder:

Call Logs

Retrieve call log records for your account:
const result = await myRingCentralClient.invoke(
  "GET",
  "/restapi/v1.0/account/~/call-log",
  "get-call-log",
);
Get details for a specific call record:
const result = await myRingCentralClient.invoke(
  "GET",
  "/restapi/v1.0/account/~/call-log/{callLogId}",
  "get-call-record",
);

Messages

List messages from your RingCentral account:
const result = await myRingCentralClient.invoke(
  "GET",
  "/restapi/v1.0/account/~/extension/~/message-store",
  "list-messages",
);

SMS

Send an SMS message:
const result = await myRingCentralClient.invoke(
  "POST",
  "/restapi/v1.0/account/~/extension/~/sms",
  "send-sms",
  {
    body: {
      type: "json",
      value: {
        to: [{ phoneNumber: "+1234567890" }],
        text: "Your message here",
      },
    },
  }
);

Extensions

List extensions in your account:
const result = await myRingCentralClient.invoke(
  "GET",
  "/restapi/v1.0/account/~/extension",
  "list-extensions",
);
Get details for a specific extension:
const result = await myRingCentralClient.invoke(
  "GET",
  "/restapi/v1.0/account/~/extension/{extensionId}",
  "get-extension",
);

Inputs

The invoke method accepts the following arguments:
method
string
required
The HTTP method to use: "GET", "POST", "PUT", "PATCH", or "DELETE".
path
string
required
The RingCentral API path (e.g., /restapi/v1.0/account/~/call-log).
invocationKey
string
required
A unique identifier for this operation.
options
object
Optional configuration object.

Outputs

The output format is the same as the Custom API client.
kind
"api"
Discriminator for the response type.
status
number
The HTTP status code.
body
ResponseBody
The response body (typically JSON).