new_releases 更新:查看
版本说明,了解新功能和产品动态。
客户端库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
RBM 客户端库简化了使用 Node.js、C#、Python 或 Java 创建 RBM 代理的过程。这些库会发布在我们的开源项目中,并发布到互联网代码库中,以便您在代码中轻松使用。
Node.js
将以下依赖项添加到您的 package.json
文件中:
"dependencies": {
"@google/rcsbusinessmessaging": "^1.0.7"
}
请访问 npm 代码库,了解最新版本。
在代码中需要的位置导入:
const rbmApiHelper = require('@google/rcsbusinessmessaging');
Java
将以下依赖项添加到您的 pom.xml
文件中:
<dependency>
<groupId>com.google.rbm</groupId>
<artifactId>rbm-api-helper</artifactId>
<version>1.0.0</version>
</dependency>
请查看 Maven 制品库,了解最新版本。
在代码中需要的位置导入:
import com.google.rbm.RbmApiHelper;
前提条件
在开始之前,您需要完成以下操作:
设置
下载第一个代理示例。
注意:请使用您的 RBM Google 账号登录,以访问下载链接。
在本地机器上解压缩该文件。
按照 README 中的说明配置 RBM 凭据。
了解详情
查看 RBM 代理最佳实践和示例,了解该平台及其功能。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-04-10。
[null,null,["最后更新时间 (UTC):2025-04-10。"],[[["\u003cp\u003eRBM client libraries are available in Node.js, C#, Python, and Java to facilitate the creation of RBM agents.\u003c/p\u003e\n"],["\u003cp\u003eThese libraries can be easily integrated into your code by adding the appropriate dependency to your project's configuration file, such as \u003ccode\u003epackage.json\u003c/code\u003e for Node.js or \u003ccode\u003epom.xml\u003c/code\u003e for Java.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the libraries, you need to register an agent and download/install the necessary software, such as Node.js, Java SDK, Python, or .NET SDK.\u003c/p\u003e\n"],["\u003cp\u003eThe process includes downloading a sample, extracting it, and configuring your RBM credentials according to the provided README instructions.\u003c/p\u003e\n"],["\u003cp\u003eThe libraries are located in the open-source project, with specific links available for the npm repository and the maven repository.\u003c/p\u003e\n"]]],[],null,["# Client libraries\n\nThe RBM client libraries simplify the creation of RBM agents using Node.js, C#,\nPython, or Java. The libraries are published in our\n[open source project](https://github.com/rcs-business-messaging/rbm-api-examples/)\nand released to internet repositories for easy use in your code. \n\n### Node.js\n\n\nAdd the following dependency to your `package.json` file: \n\n \"dependencies\": {\n \"@google/rcsbusinessmessaging\": \"^1.0.7\"\n }\n\nCheck the [npm repository](https://www.npmjs.com/package/@google/rcsbusinessmessaging)\nfor the latest version.\n\nImport where required in your code: \n\n const rbmApiHelper = require('@google/rcsbusinessmessaging');\n\n### Java\n\nAdd the following dependency to your `pom.xml` file: \n\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.google.rbm\u003c/groupId\u003e\n \u003cartifactId\u003erbm-api-helper\u003c/artifactId\u003e\n \u003cversion\u003e1.0.0\u003c/version\u003e\n \u003c/dependency\u003e\n\nCheck the [Maven repository](https://central.sonatype.com/artifact/com.google.rbm/rcsbusinessmessaging)\nfor the latest version.\n\nImport where required in your code: \n\n import com.google.rbm.RbmApiHelper;\n\nPrerequisites\n-------------\n\nBefore you get started, you need to do the following things:\n\n- [Register](/business-communications/rcs-business-messaging/guides/build/agents) an agent.\n- Download and install required software:\n\n ### Node.js\n\n - [Node.js](https://nodejs.org/en/)\n\n ### Java\n\n - [Java 8 SDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html)\n - [Maven 3.3.9](http://maven.apache.org) or later\n\n ### Python\n\n - [Python 3+](https://www.python.org/downloads/)\n - [virtualenv](https://pypi.org/project/virtualenv/)\n\n ### C#\n\n - [.NET SDK 2.1](https://dotnet.microsoft.com/download/dotnet-core/2.1) or later\n\nSetup\n-----\n\n1. Download the First Agent Sample.\n\n Note: [Sign in]() with your RBM Google Account to access download links.\n\n \u003cbr /\u003e\n\n2. Extract the file on your local machine.\n\n3. Follow the instructions in the README to configure your RBM credentials.\n\nLearn more\n----------\n\nTake a look at the RBM agent [best practices](/business-communications/rcs-business-messaging/guides/learn/best-practices)\nand [samples](/business-communications/rcs-business-messaging/samples) to get\nto know the platform and what it can do."]]