integrations/messaging/rcs/dist¶
Interfaces¶
ParseRcsWebhookOptions¶
Properties¶
clientToken?¶
jwtVerifier?¶
requireSignature?¶
sharedSecret?¶
verifier?¶
RcsAgentEvent¶
Indexable¶
Properties¶
eventType¶
messageId?¶
RcsAgentMessage¶
Indexable¶
Properties¶
contentMessage?¶
expireTime?¶
messageTrafficType?¶
representative?¶
ttl?¶
RcsAgentResource¶
Indexable¶
Properties¶
displayName?¶
name?¶
rcsBusinessMessagingAgent?¶
RcsBusinessMessagingSdkClient¶
Properties¶
files¶
create()¶
Parameters¶
| Parameter | Type |
|---|---|
params |
RcsMessagingJsonObject & { access_token?: string; agentId?: string; media?: { body?: unknown; mimeType?: string; }; requestBody?: RcsCreateFileInput; } |
options? |
RcsBusinessMessagingSdkRequestOptions |
Returns¶
Promise\<RcsBusinessMessagingSdkResponse\<RcsFileResource>>
phones¶
phones: {
agentEvents: {
create: Promise<RcsBusinessMessagingSdkResponse<RcsAgentEvent>>;
};
agentMessages: {
create: Promise<RcsBusinessMessagingSdkResponse<RcsAgentMessage>>;
};
getCapabilities: Promise<RcsBusinessMessagingSdkResponse<RcsCapabilityResponse>>;
};
agentEvents¶
agentEvents.create()¶
Parameters¶
| Parameter | Type |
|---|---|
params |
RcsMessagingJsonObject & { access_token?: string; agentId?: string; eventId?: string; parent: string; requestBody: RcsAgentEvent; } |
options? |
RcsBusinessMessagingSdkRequestOptions |
Returns¶
Promise\<RcsBusinessMessagingSdkResponse\<RcsAgentEvent>>
agentMessages¶
agentMessages.create()¶
Parameters¶
| Parameter | Type |
|---|---|
params |
RcsMessagingJsonObject & { access_token?: string; agentId?: string; messageId: string; parent: string; requestBody: RcsAgentMessage; } |
options? |
RcsBusinessMessagingSdkRequestOptions |
Returns¶
Promise\<RcsBusinessMessagingSdkResponse\<RcsAgentMessage>>
getCapabilities()¶
Parameters¶
| Parameter | Type |
|---|---|
params |
RcsMessagingJsonObject & { access_token?: string; agentId?: string; name: string; requestId?: string; } |
options? |
RcsBusinessMessagingSdkRequestOptions |
Returns¶
Promise\<RcsBusinessMessagingSdkResponse\<RcsCapabilityResponse>>
RcsBusinessMessagingSdkRequestOptions¶
Properties¶
rootUrl?¶
signal?¶
RcsBusinessMessagingSdkResponse¶
Type Parameters¶
| Type Parameter |
|---|
T |
Properties¶
data?¶
RcsCapabilityResponse¶
Indexable¶
Properties¶
carrier?¶
features?¶
RcsContentInfo¶
Properties¶
fileUrl¶
forceRefresh?¶
thumbnailUrl?¶
RcsContentMessage¶
Indexable¶
Properties¶
contentInfo?¶
richCard?¶
suggestions?¶
text?¶
uploadedRbmFile?¶
RcsCreateFileInput¶
Properties¶
fileUrl¶
thumbnailUrl?¶
RcsCredentialStatusInput¶
Properties¶
accessToken?¶
agentId?¶
agentName?¶
expiresAt?¶
providerClientConfigured?¶
scopes?¶
serviceAccountConfigured?¶
tokenProviderConfigured?¶
webhookClientToken?¶
RcsFileResource¶
Indexable¶
Properties¶
fileUrl?¶
name?¶
thumbnailUrl?¶
RcsLiveCheckOptions¶
Extends¶
Properties¶
accessToken?¶
Inherited from¶
RcsMessagingClientOptions.accessToken
agentId?¶
Inherited from¶
RcsMessagingClientOptions.agentId
agentName?¶
Inherited from¶
RcsMessagingClientOptions.agentName
baseUrl?¶
Inherited from¶
RcsMessagingClientOptions.baseUrl
capabilityPhoneNumber?¶
client?¶
optional client?: Pick<RcsMessagingClient,
| "getAgent"
| "getAgentLaunch"
| "getAgentVerification"
| "getCapabilities">;
fetch?¶
Call Signature¶
Parameters¶
| Parameter | Type |
|---|---|
input |
URL | RequestInfo |
init? |
RequestInit |
Returns¶
Promise\<Response>
Call Signature¶
Parameters¶
| Parameter | Type |
|---|---|
input |
string | Request | URL |
init? |
RequestInit |
Returns¶
Promise\<Response>
Inherited from¶
RcsMessagingClientOptions.fetch
managementApiBaseUrl?¶
Inherited from¶
RcsMessagingClientOptions.managementApiBaseUrl
managementBaseUrl?¶
Inherited from¶
RcsMessagingClientOptions.managementBaseUrl
messagingApiBaseUrl?¶
Inherited from¶
RcsMessagingClientOptions.messagingApiBaseUrl
providerClient?¶
Inherited from¶
RcsMessagingClientOptions.providerClient
region?¶
Inherited from¶
RcsMessagingClientOptions.region
retry?¶
Inherited from¶
RcsMessagingClientOptions.retry
sdkClient?¶
Inherited from¶
RcsMessagingClientOptions.sdkClient
serviceAccount?¶
Inherited from¶
RcsMessagingClientOptions.serviceAccount
signal?¶
Inherited from¶
RcsMessagingClientOptions.signal
timeoutMs?¶
Inherited from¶
RcsMessagingClientOptions.timeoutMs
tokenProvider?¶
Inherited from¶
RcsMessagingClientOptions.tokenProvider
RcsMessagingClient¶
Extends¶
Properties¶
providerClient¶
rawClient?¶
Inherited from¶
RcsMessagingProviderClient.rawClient
Methods¶
createFile()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsCreateFileInput |
Returns¶
Promise\<RcsFileResource>
Inherited from¶
RcsMessagingProviderClient.createFile
getAgent()¶
Parameters¶
| Parameter | Type |
|---|---|
agentName? |
string |
Returns¶
Promise\<RcsAgentResource>
Inherited from¶
RcsMessagingProviderClient.getAgent
getAgentLaunch()¶
Parameters¶
| Parameter | Type |
|---|---|
agentName? |
string |
Returns¶
Promise\<RcsMessagingProviderResponse>
Inherited from¶
RcsMessagingProviderClient.getAgentLaunch
getAgentVerification()¶
Parameters¶
| Parameter | Type |
|---|---|
agentName? |
string |
Returns¶
Promise\<RcsMessagingProviderResponse>
Inherited from¶
RcsMessagingProviderClient.getAgentVerification
getCapabilities()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
{ phoneNumber: string; requestId?: string; } |
input.phoneNumber |
string |
input.requestId? |
string |
Returns¶
Promise\<RcsCapabilityResponse>
Inherited from¶
RcsMessagingProviderClient.getCapabilities
rawRequest()?¶
Type Parameters¶
| Type Parameter | Default type |
|---|---|
T |
RcsMessagingProviderResponse |
Parameters¶
| Parameter | Type |
|---|---|
operation |
string |
input? |
unknown |
Returns¶
Promise\<T>
Inherited from¶
RcsMessagingProviderClient.rawRequest
sendAgentEvent()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsSendAgentEventInput |
Returns¶
Promise\<RcsAgentEvent>
Inherited from¶
RcsMessagingProviderClient.sendAgentEvent
sendCard()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsSendCardInput |
Returns¶
Promise\<RcsAgentMessage>
sendMedia()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsSendMediaInput |
Returns¶
Promise\<RcsAgentMessage>
sendMessage()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsSendMessageInput |
Returns¶
Promise\<RcsAgentMessage>
Inherited from¶
RcsMessagingProviderClient.sendMessage
sendReadReceipt()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
{ eventId?: string; messageId: string; phoneNumber: string; } |
input.eventId? |
string |
input.messageId |
string |
input.phoneNumber |
string |
Returns¶
Promise\<RcsAgentEvent>
sendText()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsSendTextInput |
Returns¶
Promise\<RcsAgentMessage>
sendTyping()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
{ eventId?: string; phoneNumber: string; } |
input.eventId? |
string |
input.phoneNumber |
string |
Returns¶
Promise\<RcsAgentEvent>
uploadFile()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsUploadFileInput |
Returns¶
Promise\<RcsFileResource>
Inherited from¶
RcsMessagingProviderClient.uploadFile
RcsMessagingClientOptions¶
Extended by¶
Properties¶
accessToken?¶
agentId?¶
agentName?¶
baseUrl?¶
fetch?¶
Call Signature¶
Parameters¶
| Parameter | Type |
|---|---|
input |
URL | RequestInfo |
init? |
RequestInit |
Returns¶
Promise\<Response>
Call Signature¶
Parameters¶
| Parameter | Type |
|---|---|
input |
string | Request | URL |
init? |
RequestInit |
Returns¶
Promise\<Response>
managementApiBaseUrl?¶
managementBaseUrl?¶
messagingApiBaseUrl?¶
providerClient?¶
region?¶
retry?¶
sdkClient?¶
serviceAccount?¶
signal?¶
timeoutMs?¶
tokenProvider?¶
RcsMessagingJsonObject¶
Extended by¶
Indexable¶
RcsMessagingProviderClient¶
Extended by¶
Properties¶
rawClient?¶
Methods¶
createFile()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsCreateFileInput |
Returns¶
Promise\<RcsFileResource>
getAgent()¶
Parameters¶
| Parameter | Type |
|---|---|
agentName? |
string |
Returns¶
Promise\<RcsAgentResource>
getAgentLaunch()¶
Parameters¶
| Parameter | Type |
|---|---|
agentName? |
string |
Returns¶
Promise\<RcsMessagingProviderResponse>
getAgentVerification()¶
Parameters¶
| Parameter | Type |
|---|---|
agentName? |
string |
Returns¶
Promise\<RcsMessagingProviderResponse>
getCapabilities()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
{ phoneNumber: string; requestId?: string; } |
input.phoneNumber |
string |
input.requestId? |
string |
Returns¶
Promise\<RcsCapabilityResponse>
rawRequest()?¶
Type Parameters¶
| Type Parameter | Default type |
|---|---|
T |
RcsMessagingProviderResponse |
Parameters¶
| Parameter | Type |
|---|---|
operation |
string |
input? |
unknown |
Returns¶
Promise\<T>
sendAgentEvent()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsSendAgentEventInput |
Returns¶
Promise\<RcsAgentEvent>
sendMessage()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsSendMessageInput |
Returns¶
Promise\<RcsAgentMessage>
uploadFile()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsUploadFileInput |
Returns¶
Promise\<RcsFileResource>
RcsMessagingProviderExtensionFields¶
Extends¶
Indexable¶
RcsMessagingProviderResponse¶
Extends¶
Indexable¶
RcsRichCard¶
Indexable¶
Properties¶
carouselCard?¶
standaloneCard?¶
RcsSelectedOperation¶
Properties¶
api¶
functionName¶
method¶
notes?¶
path¶
sourceUrl¶
uid¶
RcsSendAgentEventInput¶
Properties¶
event¶
eventId?¶
phoneNumber¶
RcsSendCardInput¶
Properties¶
expireTime?¶
messageId¶
messageTrafficType?¶
phoneNumber¶
richCard¶
suggestions?¶
ttl?¶
RcsSendMediaInput¶
Properties¶
contentInfo?¶
expireTime?¶
messageId¶
messageTrafficType?¶
phoneNumber¶
suggestions?¶
ttl?¶
uploadedRbmFile?¶
RcsSendMessageInput¶
Properties¶
message¶
messageId¶
phoneNumber¶
RcsSendTextInput¶
Properties¶
expireTime?¶
messageId¶
messageTrafficType?¶
phoneNumber¶
suggestions?¶
text¶
ttl?¶
RcsServiceAccountCredentials¶
Properties¶
clientEmail¶
privateKey¶
scopes?¶
tokenUri?¶
RcsSuggestion¶
Indexable¶
Properties¶
action?¶
reply?¶
RcsUploadedRbmFile¶
Properties¶
fileName¶
thumbnailName?¶
RcsUploadFileInput¶
Properties¶
body¶
contentType¶
RcsWebhookEnvelope¶
Indexable¶
Properties¶
clientToken?¶
message?¶
optional message?: {
[key: string]: RcsMessagingProviderExtensionValue;
attributes?: Record<string, string>;
body?: string;
data?: string;
messageId?: string;
publishTime?: string;
};
Index Signature¶
attributes?¶
body?¶
data?¶
messageId?¶
publishTime?¶
secret?¶
subscription?¶
RcsWebhookEvent¶
Properties¶
decodedBody?¶
encodedMessageBody?¶
envelope¶
kind¶
payload¶
rawBody¶
ValidateRcsWebhookSignatureInput¶
Properties¶
clientToken¶
encodedMessageBody¶
signature¶
Type Aliases¶
RcsAccessTokenProvider¶
Parameters¶
| Parameter | Type |
|---|---|
input |
{ fetch: typeof fetch; scopes: string[]; } |
input.fetch |
typeof fetch |
input.scopes |
string[] |
Returns¶
string | Promise\<string>
RcsAgentEventType¶
RcsJwtVerifier¶
Parameters¶
| Parameter | Type |
|---|---|
input |
{ decodedBody: string; envelope: RcsWebhookEnvelope; rawBody: string; request: Request; token: string; } |
input.decodedBody |
string |
input.envelope |
RcsWebhookEnvelope |
input.rawBody |
string |
input.request |
Request |
input.token |
string |
Returns¶
boolean | Promise\<boolean>
RcsMessageTrafficType¶
type RcsMessageTrafficType =
| "MESSAGE_TRAFFIC_TYPE_UNSPECIFIED"
| "AUTHENTICATION"
| "TRANSACTION"
| "PROMOTION"
| "SERVICEREQUEST"
| "ACKNOWLEDGEMENT";
RcsMessagingJsonPrimitive¶
RcsMessagingJsonValue¶
type RcsMessagingJsonValue =
| RcsMessagingJsonPrimitive
| RcsMessagingJsonObject
| readonly RcsMessagingJsonValue[];
RcsMessagingProviderExtensionValue¶
RcsMessagingProviderPayload¶
RcsMessagingProviderQuery¶
RcsWebhookEventKind¶
type RcsWebhookEventKind =
| "verification"
| "message"
| "delivery-receipt"
| "read-receipt"
| "typing"
| "subscription"
| "suggestion"
| "platform"
| "unknown";
RcsWebhookVerifier¶
Parameters¶
| Parameter | Type |
|---|---|
input |
{ decodedBody: string; envelope: RcsWebhookEnvelope; rawBody: string; request: Request; } |
input.decodedBody |
string |
input.envelope |
RcsWebhookEnvelope |
input.rawBody |
string |
input.request |
Request |
Returns¶
boolean | Promise\<boolean>
Variables¶
RCS_BUSINESS_COMMUNICATIONS_SCOPE¶
const RCS_BUSINESS_COMMUNICATIONS_SCOPE: "https://www.googleapis.com/auth/businesscommunications" = "https://www.googleapis.com/auth/businesscommunications";
RCS_HOST_CLIENT_METADATA¶
const RCS_HOST_CLIENT_METADATA: {
allowlistChecksum: string;
allowlistChecksumAlgorithm: "sha256";
apiCoverage: {
checkedAt: "2026-06-25";
operationCatalog: "package:src/selected-operations.ts";
};
checkedAt: "2026-06-25";
sdkDecision: {
failClosedWithoutCredentialedTransport: true;
notes: readonly ["@google/rcsbusinessmessaging is the default runtime for RBM agentMessages, agentEvents, files, and phone capabilities.", "The package does not expose the Business Communications brands.agents readiness API used by this support slice, so those read-only checks use a strict typed REST adapter.", "Both runtime paths share the same accessToken, tokenProvider, and service-account credential handling.", "API key-only transport is rejected; hosts may inject RcsMessagingProviderClient when they want to wrap Google's SDK or another approved provider runtime."];
officialRuntimeSdk: {
docsUrl: "https://developers.google.com/business-communications/rcs-business-messaging/reference/libraries";
npmModifiedAt: "2025-04-30T16:44:00.722Z";
packageName: "@google/rcsbusinessmessaging";
status: "real-maintained-rbm-runtime";
versionChecked: "1.0.10";
};
selectedDefaultClient: "google-rcsbusinessmessaging-sdk-plus-businesscommunications-rest";
viableAsSoleDefaultRuntime: false;
viableForRbmMessagingRuntime: true;
};
selectedOperations: (
| {
api: "rcsbusinessmessaging.v1";
functionName: string;
method: "POST";
notes?: never;
path: string;
sourceUrl: string;
uid: string;
}
| {
api: "rcsbusinessmessaging.v1";
functionName: string;
method: "POST";
notes: string;
path: string;
sourceUrl: string;
uid: string;
}
| {
api: "rcsbusinessmessaging.v1";
functionName: string;
method: "GET";
notes?: never;
path: string;
sourceUrl: string;
uid: string;
}
| {
api: "businesscommunications.v1";
functionName: string;
method: "GET";
notes?: never;
path: string;
sourceUrl: string;
uid: string;
})[];
source: "official Google RCS for Business SDK plus Business Communications REST reference";
sourceVersion: "rcsbusinessmessaging.v1 + businesscommunications.v1 public docs checked 2026-06-25";
strategy: "provider-sdk-hybrid";
};
Type Declaration¶
RCS_MESSAGING_SCOPE¶
const RCS_MESSAGING_SCOPE: "https://www.googleapis.com/auth/rcsbusinessmessaging" = "https://www.googleapis.com/auth/rcsbusinessmessaging";
RCS_SELECTED_OPERATION_COUNT¶
RCS_SELECTED_OPERATIONS¶
const RCS_SELECTED_OPERATIONS: (
| {
api: "rcsbusinessmessaging.v1";
functionName: string;
method: "POST";
notes?: never;
path: string;
sourceUrl: string;
uid: string;
}
| {
api: "rcsbusinessmessaging.v1";
functionName: string;
method: "POST";
notes: string;
path: string;
sourceUrl: string;
uid: string;
}
| {
api: "rcsbusinessmessaging.v1";
functionName: string;
method: "GET";
notes?: never;
path: string;
sourceUrl: string;
uid: string;
}
| {
api: "businesscommunications.v1";
functionName: string;
method: "GET";
notes?: never;
path: string;
sourceUrl: string;
uid: string;
})[];
Functions¶
createRcsCardMessage()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
Omit\<RcsSendCardInput, "phoneNumber" | "messageId"> |
Returns¶
createRcsMediaMessage()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
Omit\<RcsSendMediaInput, "phoneNumber" | "messageId"> |
Returns¶
createRcsMessagingClient()¶
Parameters¶
| Parameter | Type |
|---|---|
options? |
RcsMessagingClientOptions |
Returns¶
createRcsMessagingLiveChecks()¶
function createRcsMessagingLiveChecks(options): (
| {
description: string;
id: string;
requiredCredentialIds: string[];
run: Promise<
| {
details: {
agentName: string;
displayName?: never;
name?: never;
};
}
| {
details: {
agentName?: never;
displayName: string;
name: string;
};
}>;
}
| {
description: string;
id: string;
requiredCredentialIds: string[];
run: Promise<{
details: RcsMessagingProviderResponse;
}>;
}
| {
description: string;
id: string;
requiredCredentialIds: string[];
run: Promise<
| {
details: {
carrier?: never;
features?: never;
phoneNumber: string;
};
}
| {
details: {
carrier: string;
features: string[];
phoneNumber?: never;
};
}>;
})[];
Parameters¶
| Parameter | Type |
|---|---|
options |
RcsLiveCheckOptions |
Returns¶
(
| {
description: string;
id: string;
requiredCredentialIds: string[];
run: Promise\<
| {
details: {
agentName: string;
displayName?: never;
name?: never;
};
}
| {
details: {
agentName?: never;
displayName: string;
name: string;
};
}>;
}
| {
description: string;
id: string;
requiredCredentialIds: string[];
run: Promise\<{
details: RcsMessagingProviderResponse;
}>;
}
| {
description: string;
id: string;
requiredCredentialIds: string[];
run: Promise\<
| {
details: {
carrier?: never;
features?: never;
phoneNumber: string;
};
}
| {
details: {
carrier: string;
features: string[];
phoneNumber?: never;
};
}>;
})[]
createRcsRestProviderClient()¶
Parameters¶
| Parameter | Type |
|---|---|
options |
RcsMessagingClientOptions |
Returns¶
createRcsSdkProviderClient()¶
Parameters¶
| Parameter | Type |
|---|---|
options |
RcsMessagingClientOptions |
Returns¶
createRcsTextMessage()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
Omit\<RcsSendTextInput, "phoneNumber" | "messageId"> |
Returns¶
parseRcsWebhook()¶
Parameters¶
| Parameter | Type |
|---|---|
request |
Request |
options? |
ParseRcsWebhookOptions |
Returns¶
Promise\<RcsWebhookEvent>
rcsMessagingCredentialStatuses()¶
function rcsMessagingCredentialStatuses(input): {
expiresAt?: string;
message?: string;
providerPackageId?: string;
requirementId: string;
scopes?: string[];
state: | "required"
| "configured"
| "permission-blocked"
| "not-required"
| "missing"
| "expired"
| "insufficient-scope"
| "unavailable";
}[];
Parameters¶
| Parameter | Type |
|---|---|
input |
RcsCredentialStatusInput |
Returns¶
{
expiresAt?: string;
message?: string;
providerPackageId?: string;
requirementId: string;
scopes?: string[];
state: | "required"
| "configured"
| "permission-blocked"
| "not-required"
| "missing"
| "expired"
| "insufficient-scope"
| "unavailable";
}[]
validateRcsWebhookSignature()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
ValidateRcsWebhookSignatureInput |
Returns¶
boolean
verifyRcsWebhookChallenge()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
{ clientToken: string; expectedClientToken: string; secret: string; } |
input.clientToken |
string |
input.expectedClientToken |
string |
input.secret |
string |
Returns¶
string
References¶
rcsMessagingProviderManifest¶
Re-exports rcsMessagingProviderManifest